Add icon picker for floating window triggers and increase label font size#19
Add icon picker for floating window triggers and increase label font size#19Programmer-MrWang wants to merge 1 commit intomainfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 024ebe8cc1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| var panel = new StackPanel { Spacing = 10, Margin = new(10) }; | ||
| _rootGrid = new Grid | ||
| { | ||
| ColumnDefinitions = new ColumnDefinitions("*,420"), |
There was a problem hiding this comment.
Collapse icon-drawer column when drawer is closed
The grid reserves a fixed 420-pixel second column regardless of whether _iconDrawer is visible, so closing the drawer only hides its content and still permanently shrinks the main settings form. In narrower settings hosts this can make the editable fields feel cramped or clipped even before the user opens the picker; the column width should be toggled with drawer state (or use Auto/splitter behavior) instead of staying fixed.
Useful? React with 👍 / 👎.
| var drawerContent = new StackPanel | ||
| { | ||
| Children = |
There was a problem hiding this comment.
Constrain icon list viewport to preserve virtualization
Placing the icon ListBox inside a vertical StackPanel gives it effectively unbounded height during measure, which can defeat list virtualization and force creation of the full icon grid when the drawer opens. Given LoadIconRows() builds hundreds of rows from the 0xE000..0xF4D3 range, this can cause a noticeable UI stall; use a layout that constrains the list (for example a Grid row with * height or explicit max height) so virtualization can work.
Useful? React with 👍 / 👎.
Motivation
Description
10to12inServices/FloatingWindowService.csto improve readability.Settings/FloatingWindowTriggerSettings.csto replace the simple stack layout with a two-columnGridand added an icon drawer panel built byBuildIconDrawer()that contains a virtualizedListBoxof icon rows.OpenIconDrawer(),CloseIconDrawer(),SelectIcon(string),LoadIconRows(), and UI helpersBuildRowPanel(IconRow)andBuildIconDrawer(), plus theIconItemandIconRowrecords to represent available icons and rows.IconCodeStart,IconCodeEnd, andIconsPerRowand wired the iconTextBoxand a new "选择图标" button to updateSettings.Iconimmediately on selection.Testing
Codex Task