Skip to content

Normalize bar icon size and alignment - #15065

Merged
bjarneo merged 2 commits into
omacom:quattrofrom
bjarneo:fix/bar-icon-consistency
Oct 11, 2026
Merged

bjarneo merged 2 commits into
omacom:quattrofrom
bjarneo:fix/bar-icon-consistency

Conversation

@bjarneo

@bjarneo bjarneo commented Oct 11, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Fit built-in and custom bar icons to a shared 12px visual target.
  • Center visible glyph bounds on both axes and preserve each icon's aspect ratio.
  • Normalize custom components and icon-only WidgetButton content, including 15px source icons.
  • Keep the battery percentage separate from its icon.
  • Support shared icon dimensions in a theme's shell.toml.

Before and after

The comparison uses enlarged grayscale crops to show icon size and alignment.

Before and after bar icons

Verification

  • bash test/shell.d/bar-icon-geometry-test.sh passes.
  • bash test/shell.d/bar-widget-contract-test.sh passes.
  • bash test/shell.d/bar-test.sh passes.
  • git diff --check passes.
  • Live bar screenshots confirm size, alignment, and clear space around the icons.

The geometry test covers custom glyphs, nested components, images, rotation, dynamic source dimensions, font scale, and the battery percentage.

@greptile-apps

greptile-apps Bot commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; both previous findings are addressed and no new blocking issues were found.

Summary

Fits bar icons to a shared visual size while preserving their proportions.

  • Bar icons fit a shared size and center on their visible artwork.
  • The battery percentage sits beside the icon as separate text.

Reviews (2) · Last reviewed commit: "Correct custom bar icon bounds" · Reviewed by Greptile

Comment thread shell/Ui/IconContentBounds.qml Resolved
Comment thread shell/Ui/IconContentBounds.qml Resolved
@bjarneo
bjarneo merged commit 9480d1b into omacom:quattro Oct 11, 2026
1 check passed
@bjarneo
bjarneo deleted the fix/bar-icon-consistency branch October 11, 2026 20:23
diogochaves added a commit to diogochaves/omabox that referenced this pull request Oct 14, 2026
Omarchy after 4.0.4 (omacom/omarchy#15065) fits everything a bar
widget's iconComponent paints to one icon size. The count sat in a Row
with the mark there, so with two or more boxes both were scaled: the
mark fell from 12 px to about 7x8. Only the mark paints in the icon
now, beside an empty spacer that keeps 4.0.4's centring; the count is
drawn on the button at the mark's painted edge, from the shell's
componentPaintedWidth where icons are fitted. On 4.0.4 the count lands
on the same pixels and the mark no longer moves up a pixel when it
shows.

t_widget_mark measures the widget's ink at 1, 2, 3 and 12 boxes, on
OMABOX_TEST_OMARCHY's tree when set; the Omarchy contract checks that a
fitting shell has componentPaintedWidth. Finding 301.

Refs #219

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@emirb emirb added this to the 4.5 milestone Oct 17, 2026
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.

2 participants