Skip to content

Stand the bar icon upright - #3

Closed
spencerbull wants to merge 1 commit into
mainfrom
t3code/fix-world-clock-icon
Closed

spencerbull wants to merge 1 commit into
mainfrom
t3code/fix-world-clock-icon

Conversation

@spencerbull

Copy link
Copy Markdown
Collaborator

What was wrong

The globe in the bar rendered as a dotted blob rather than a globe.

Panel.qml leaned the bar glyph over by the earth's obliquity, passing textRotation: Solar.AXIAL_TILT (23.44 degrees) to BarIconButton. The shell draws bar glyphs through OpticalGlyph, which uses Text.NativeRendering at about thirteen pixels. Native rendering assumes pixel-aligned text, and the globe glyph (U+F0AC) is a lattice of roughly one-pixel lines, so turning it off the pixel grid shreds it. Every other icon in the bar is upright and crisp.

Both components are identical in the packaged shell (/usr/share/omarchy/shell/Ui/), so this is what every install shows, not something particular to a dev shell.

The fix

The bar icon stands upright: the textRotation line is gone, and the comment in its place says why. The hero globe in the panel keeps its lean; it is drawn on a Canvas and large enough to carry it.

The README said "The sidebar icon carries the same tilt, via WidgetButton.textRotation." It now says the icon does not, and why.

Why not keep the tilt another way

Two alternatives were rendered and set aside:

  • A rotation-tolerant render type. BarIconButton.iconComponent would let the plugin supply its own Text with Text.QtRendering or Text.CurveRendering. Rendered at the same size and angle, QtRendering came out colour-fringed and CurveRendering had a smoother outline, but neither resolved the graticule. At thirteen pixels the lattice does not survive the rotation under any of Qt's renderers; native rendering is only the worst of them.
  • The drawn MiniGlobe as the bar icon. Below 22 pixels it draws the graticule alone, which at bar size reads as a crosshair in a circle, and its filled disc is heavier than the glyph icons beside it.

Verified

  • The comparison was rendered in a real window on an OpenGL scenegraph, with GraphicsInfo.api logged alongside the grab. An earlier pass under QT_QPA_PLATFORM=offscreen was discarded: that platform falls back to the software backend, which ignores renderType and paints all text through QPainter, so it cannot distinguish the render types.
  • The comparison ran at a device pixel ratio of 2; the machine the fault was reported on runs at 1.33. The upright glyph is pixel-aligned either way, and the other upright glyphs in the reporter's bar are crisp at 1.33.
  • scripts/check-manifest.sh passes and tests/run --offline passes (11 node checks, the currency table, 6 QML tests). Nothing in the suite covers the bar icon, so these show only that nothing else moved.
  • Not yet seen in a running bar: the change has not been installed into a live shell.

The globe glyph in the bar was leaned over by the earth's obliquity via
WidgetButton.textRotation. The shell draws bar glyphs with native text
rendering at about thirteen pixels, and the glyph's lattice does not
survive being turned off the pixel grid: it came out as a dotted blob.

Qt's other render types were tried on the same glyph at the same angle
on a GPU scenegraph and none resolved the graticule, so the icon stands
upright. The hero globe in the panel is drawn, and keeps its lean.
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