Skip to content

fix(bar): uniform ink-to-ink module gaps from painted widths - #11309

Open
ekollof wants to merge 2 commits into
omacom:quattrofrom
ekollof:fix/bar-module-spacing
Open

fix(bar): uniform ink-to-ink module gaps from painted widths#11309
ekollof wants to merge 2 commits into
omacom:quattrofrom
ekollof:fix/bar-module-spacing

Conversation

@ekollof

@ekollof ekollof commented Sep 11, 2026

Copy link
Copy Markdown

Bar sections keep ink-to-ink gaps uniform at 12px: every ModuleSlot measures its own tight painted width and pads itself symmetrically so paint sits 6px from each slot edge.

Why: a fixed positioner spacing stacks on top of the widest widget bearings instead of absorbing them, so icon/icon pairs sat tighter than icon/text pairs, custom third-party widths broke the rhythm, and paint wider than its slot (icon + percentage in an icon slot) touched its neighbours.

How:

  • ModuleSlot pads from tight paint: BarIconButton glyphs, WidgetButton labels (new tight bounds), vector icon content (forwarded through BarIconButton, capped at the canvas), icon canvases; opaque customs count as full-bleed. Paint wider than its slot is compensated instead of overlapping, and padding may intrude up to 3px into a widget's own empty margins to enforce the gap — never into paint.
  • The button is measured one level inside the widget root (popup buttons nest deeper and stay out of reach); tray and the pure-gap spacer are exempt. Hidden widgets stay collapsed, and the open-panel mark still measures content, not padding.
  • The Row/Column itself uses no spacing; BarModel.slotPad holds the pure math.

Validation: new test/shell.d/bar-module-spacing-test.sh (static wiring checks, slotPad node units incl. the pair-gap identity, offscreen quickshell fixture proving kit paint metrics track content incl. overflowing paint). bar-test (88), bar-icon-geometry, bar-widget-contract all pass; qmllint shows no new warning classes on any touched QML file.

Tested live via integration-prs on my machine.

Emiel Kollof added 2 commits September 11, 2026 14:17
A fixed positioner spacing stacks on top of the widest widget bearings
instead of absorbing them, so icon/icon pairs sat tighter than
icon/text pairs, custom third-party widths broke the rhythm, and paint
wider than its slot touched its neighbours.

Every ModuleSlot now pads itself symmetrically from its own tight
painted width — icon glyphs, pill labels (new tight bounds on
WidgetButton), vector icon content (forwarded through BarIconButton),
icon canvases — so neighbours sit exactly 12px ink-to-ink. Paint wider
than its slot is compensated instead of overlapping; padding may intrude
up to 3px into a widget's own empty margins to enforce the gap, never
into paint. The button is measured one level inside the widget root
(popup buttons nest deeper and stay out of reach); tray and the pure-gap
spacer are exempt. Hidden widgets stay collapsed, and the open-panel
mark still measures content, not padding.
@ekollof
ekollof force-pushed the fix/bar-module-spacing branch from b0d1ce1 to deff5e3 Compare September 11, 2026 12:17
@ekollof
ekollof marked this pull request as ready for review September 11, 2026 12:17
@ekollof

ekollof commented Sep 11, 2026

Copy link
Copy Markdown
Author

Screenshot of result:
image

No real visible impact, but you will notice when new bar icons get added that lie about their actual size (because they change size). This patch will make the bar react to this and keep spacing consistent. Omarchy must resist becoming ugly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant