Repository navigation
dock: let spacers fill the free space and center a group - #4417
Merged
Merged
Conversation
In taskbar mode a dock spacer gets a Fill switch. Filling spacers grow from their size into the free space the other items leave, split equally. Once the dock has a filling spacer, a widget row can be marked Center: its group (everything between the filling spacers around it) stays in the middle of the dock and the spacers on each side share that side's free space, so a left, center and right layout keeps its center whatever the widths beside it. Settings highlights every row of the centered group. The strip already distributed space to flexible items in taskbar mode, but nothing could create one. The spacer's size now acts as the minimum of a filling spacer, its slider goes up to 1000 px, and a size of 0 is no longer shown as 20. Spacer rows fold their options away and open them on click, like other expandable rows, and the size slider saves when a drag ends, since saving mid-drag rebuilt the row and cut the drag off.
Contributor
Claude reviewNo issues found. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds a Fill option to dock spacers in the Taskbar style, so a spacer takes up all remaining free space on the dock. Once the dock has a filling spacer, the other rows get a Center button: it keeps that row's group (everything between the filling spacers around it, or a spacer and the dock edge) in the middle of the dock, and the filling spacers on each side of the group share the free space on their side. I wanted the taskbar to have things on the left, the apps in the middle and the tray on the right, and with fixed size spacers the apps were never really centered.
The spacer size now goes up to 1000 px and if fill is enabled it acts as the minimum size instead. A spacer at size 0 now takes no space instead of 20 px. Spacer options fold away and open on a click on the row, and dragging the size slider works again.
1 new term to translate: "Minimum size", the label of the size slider on a filling spacer.
Type of change
Related issues
Screenshots / video
Checklist
I18n.tr()with translator context, reusing existing terms where possiblemake fmt, added/updated tests,make testpasses, andgo mod tidyis cleanmake lint-qmlwith no new warnings