mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-12-01 09:22:58 -05:00
* Add a Toolbar Layout Model With Merge and Round-Trip Tests * Order and Hide Gizmo Bar Icons From the Saved Toolbar Layout * Order and Hide Main Toolbar Items From the Saved Toolbar Layout * Add a Customize Toolbar Dialog to the View Menu and Preferences * Include What the Toolbar Layout Files Use * Use the Gizmos' Contexts for Their Names and Never Press a Hidden Layer Editing Button * Skip the Hidden Layer Editing Path When the Toolbar Has No Such Item * Highlight the Selected Row and Move Rows in Place in the Customize Toolbar Dialog A click anywhere on a full-width row selects it, and the selected row gets the list-selection colour. Selecting, moving and Reset now restyle or reorder the existing rows instead of rebuilding both lists, which flickered and, on GTK, made the rows 1px taller after each Reset. The up and down arrows sit to the left of the lists, and Reset to default joins OK and Cancel at the bottom. * Show When a Row Can Move and Select a Row When Its Box Is Ticked The up and down arrows are enabled, and drawn brighter, only when the selected row can move that way. Ticking a row's box also selects it, so it can be moved straight away, and an icon the current printer or selection leaves off the toolbar now says so. * Show the Move Arrows on the Selected Row The arrows sat in a column of their own to the left of both lists, which made them look as if they moved everything selected. Each row now has its own pair, shown only while the row is selected, so they plainly move that row. Their space is kept while hidden, so rows do not shift when the selection changes, and the pointer follows the arrow after a move so repeated clicks keep moving the same row. The arrows never take keyboard focus, so a disabled arrow cannot hand focus to another control; Alt+Up and Alt+Down move the selected row instead, and Tab selects a row by focusing its box. * Leave the Pointer Where It Is After a Row Moves Moving the pointer onto the arrow after each move kept repeated clicks on the same row, but apps moving the pointer is unexpected, macOS guidelines discourage it, and GNOME on Wayland ignores it, so the dialog behaved differently by platform. Without it the row slides out from under the pointer after a move, so a click where another row's hidden arrows sit now does nothing; before, a second click there selected the neighbour and a third moved it back. Alt+Up and Alt+Down remain the quick way to move a row several places. * Move the Dialog's Row Actions to a Side Column and Add a Toolbar Right-Click Menu The Customize Toolbar dialog gets a left column with Move up and Move down, rows sit without gaps, the hovered row gets a border and the selected row is highlighted without bold. Right-clicking the toolbar or the gizmo bar on the Prepare canvas opens a menu with Customize Toolbar. * Leave No Gap for Hidden Icons in the Toolbar Width * Size the Customize Toolbar Dialog's Buttons and Lists Like the Mockup * Save Named Gizmo Groups in the Toolbar Layout The toolbar layout gains a list of named groups of gizmo bar icons. Loading drops members that are not gizmo bar icons or that an earlier group already holds, drops groups left with fewer than two members, and keeps each group's members together in the bar order. Entries this build does not recognise as groups are kept on save. * Add Grouping, Ungrouping and Moving Rules for Gizmo Groups The toolbar layout model gains the edits the Customize Toolbar dialog needs: the gizmo rows with a header before each group, making a group, adding rows to one, ungrouping, renaming, the default group name, and moving a row one step. A header moves its whole group, a plain row jumps a whole group, and a member moves within its group and leaves it at the group's edge; a group left with one member is removed. * Compute a Gizmo Bar Slot for Each Group Each group with at least two icons on the bar becomes one slot at its first icon's place. The slot shows the open tool, else the group's most recently used tool that can be opened, else the first that can, so it greys only when none of its tools can be opened. * Collapse Each Gizmo Group Into One Bar Button With a List Each group with two or more icons on the bar becomes one button with a corner triangle and the group's name as its tooltip. Clicking it opens a list under it, headed by the name, with each tool's icon, name and shortcut; a click on another group's button switches lists. A button does nothing while none of its own tools can be opened, a list closes when its group loses its slot, and the button shows the open or most recently used tool that can be opened. * Let Users Group, Rename and Ungroup Gizmos in the Customize Toolbar Dialog Ctrl+click or Shift+click selects several gizmo rows, and Group selected makes them a named group, asking for a name pre-filled with Group N; with a group and other rows selected it adds them to that group. A group shows as a bold header row with its members indented under it; its box is half-ticked when only some members show, and clicking it shows or hides them all. Rename (or a double-click on the header) and Ungroup act on the selected group, and the row arrows and Alt+Up/Down move a whole group, move a member within its group, or take it out at the group's edge. Rows rebuilt after the dialog is shown keep the row height measured when it opened. * Let Users Group Object Tools Icons and Show Each Group as an Icon Grid Groups now work in the Object tools column as well as the gizmo bar; a group holds icons of one list, and the separator cannot be grouped. The dialog's left column holds Rename, Move up, Move down, Group selected and Ungroup. A group's list is a grid of toolbar-size icons, three per row, named in their tooltips, and opens even when every member is disabled. Three dots under a group's button mark it, in place of the corner triangle. * Match the Group Lists and the Dialog's Group Selection to the Mockup The side buttons are full size with the short labels Up, Down and Group, and each list is only as wide as its rows. Selecting a group highlights its members with it. A group's list gets an accent border, and its title is drawn in the normal text colour. * Refresh Both Lists' Rows When Groups Change in the Customize Toolbar Dialog Groups of both lists share one vector, so making or removing a group in one list renumbers the other list's groups. Syncing only the changed list left the other list's rows with stale group numbers, which picked the wrong rows to highlight and could read past the end of the groups on Ungroup or Reset. * Ignore Focus Moves While the Customize Toolbar Dialog Syncs Its Rows * Share One Group List Between the Two Bars and Open the Toolbar Menu From the Whole Strip The main toolbar and the gizmo bar draw their group lists, dots and close test with shared code, so the main toolbar's list now also stays on the canvas. The lists' tooltips keep the usual border, open lists close when the Customize Toolbar dialog opens, and a right click on the divider, the gaps between gizmo icons or the assembly view button opens the menu too. Smaller trims: one list of the gizmos shown on the bar, one gizmo id lookup, a shorter choice of the tool a group shows, boost's trim, and fewer one-line wrappers. * Let a Quick Second Click Reopen a Group List A press within the double-click time arrives as a double click, which group buttons ignored, so reopening a list right after closing it took another click. Group buttons now toggle on a double click like the bars' other icons, and a double click elsewhere closes an open list like a plain press. * Keep the Upstream Main Toolbar Code and Reorder It Afterwards Apply the saved layout to the stock toolbar with GLToolbar::apply_layout instead of rebuilding it from a builder map, open the toolbar menu from one right-click hook in GLCanvas3D, let the existing input-window path draw a gizmo opened while the gizmo bar is empty, read the layout through load_toolbar_layout, compute the gizmo bar's group slots once per pass, and skip folding when there are no groups and no group slots are left. * Hide Empty Toolbars Fully and Keep the Group Dots Under Windows - An empty main toolbar or gizmo bar takes no width and draws nothing, and a divider only follows a bar that shows icons. - The group dots are drawn on ImGui's background list, so windows and tooltips cover them. - The main toolbar is placed before its dots and group list are drawn, so they follow it right after a resize. - A test ties every gizmo type to its id in the layout list. * Keep the MCP Server's Gizmo List and Toolbar Clicks Right With Grouped and Hidden Icons * Share Plain 16 px Arrow Icons for the Toolbar Dialog's Move Buttons * Keep the Toolbar Dialog's Width and Keyboard Focus Steady While Rows Move Measure a group header from its text, and only when its name changes: the best size never drops below the min size, so every move widened the header by 6 px and refitted the dialog. Treat a double click on the Move buttons and row arrows as a press, so a quick second click on Windows is not lost. Focus the clicked row's box, so Space toggles that row, and let Up and Down select the row they focus, as Tab does. The MCP refusal for a hidden toolbar item now says when the printer, not the layout, hides it. * Ungroup Only the Selected Icons and Widen the List of a Large Toolbar Group - Ungroup with only members selected takes those icons out of the group and puts them right below it; with the header selected it removes the group, as before. Either way the rows stay selected. - A member moved up or down stops at its group's first and last place instead of leaving the group there. - Group skips a separator in the selection instead of being disabled. - A group's list is four icons wide from ten icons and five wide from seventeen. - The main toolbar's group list takes the canvas's display scale, as the gizmo bar's does, so both have the same padding on a 2x display. - Focus moves are ignored while the buttons take their new state: on Windows a focused button that gets disabled hands its focus to a row. * Let a Click Decide the Selection After the Keyboard Was Used in the Toolbar Dialog Once Tab, Up or Down had been pressed, a row's box taking the focus selected its row from then on, also when a mouse click moved the focus there. A click where a row's hidden arrows sit then selected that row, and a Ctrl+click that deselected a row on its own area, not its name, made it the only selection. A click on a row now ends that state until the next Tab or arrow key. Left and Right count as Up and Down do, so the row they focus is selected too.