Skip to content

dock: let spacers fill the free space and center a group - #4417

Merged
bbedward merged 1 commit into
duxlabs-dev:masterfrom
Conava:dock-flexible-spacer
Nov 26, 2026
Merged

bbedward merged 1 commit into
duxlabs-dev:masterfrom
Conava:dock-flexible-spacer

Conversation

@Conava

@Conava Conava commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

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

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that changes existing behavior)
  • Refactor / internal cleanup
  • Documentation
  • Other

Related issues

Screenshots / video

Checklist

  • My code follows the conventions in CONTRIBUTING.md
  • I have tested my changes locally
  • New user-facing strings are wrapped in I18n.tr() with translator context, reusing existing terms where possible
  • Go changes: ran make fmt, added/updated tests, make test passes, and go mod tidy is clean
  • QML changes: ran make lint-qml with no new warnings
  • I have opened a corresponding pull request in dux-docs to document any new behaviors: docs(dms): document filling dock spacers and centering a group dux-docs#227

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.
@github-actions

github-actions Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Claude review

No issues found.
Checked: DockConfig.allocation centering/rounding math and gap placement (gaps only land at the strip edges, so position-indexed use in layoutPositions is correct), centerGroup membership parity between DockBody (unit list with pins) and the settings tab (widget order), fill/hidden-spacer handling, non-taskbar strips keeping old sizes, spacer size ?? 20 change, collapsible spacer rows and slider drag commit, Theme tokens, I18n terms, deprecated shims, idle cost. Model: claude-opus-5-5.

@bbedward
bbedward merged commit dc26415 into duxlabs-dev:master Nov 26, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature ui Quickshell UI under quickshell/

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants