Skip to content

Bar tooltip loses a border edge at display scale 1.25x (not 1.6x) #10084

Description

@ljpavlovski

What happened

At display scale 1.25x specifically, the bar's floating tooltip loses a
border edge (right, in the screenshots below; sometimes top-left, depending
on the tooltip). The rest of the border renders fine; only the rounded-off
edge is affected. Reproduced on two unrelated tooltips — the Screen
Recording indicator and the YouTube Music widget — confirming this is a bug
in the shared tooltip implementation, not one specific widget.

Notably, this reproduces at 1.25x but not at 1.6x or other non-integer
scales tested — so it isn't simply "any fractional scale breaks it." See
the root cause below for why that's plausible: the visible gap depends on
each tooltip's specific label-width remainder after scaling, and only some
scale/text combinations happen to push that remainder small enough to
disappear under anti-aliasing. Worth double-checking against other
fractional scales (1.5x, 1.75x, etc.) since the trigger condition seems
narrow rather than universal.

Expected

The tooltip's border renders on all sides regardless of display scale.

Root cause

plugins/bar/Bar.qml (around line 1056-1117): the tooltip is its own
PopupWindow, sized like this:

PopupWindow {
  id: tooltipWindow
  implicitWidth: Math.ceil(tooltipBubble.implicitWidth)
  implicitHeight: Math.ceil(tooltipBubble.implicitHeight)
  ...
  BorderSurface {
    id: tooltipBubble
    implicitWidth: tooltipLabel.implicitWidth + 20
    implicitHeight: tooltipLabel.implicitHeight + 14
    ...
  }
}

The window's buffer is deliberately widened to Math.ceil() of the content's
size (presumably to avoid clipping fractional content), but tooltipBubble
— the BorderSurface that actually draws the border — is never anchored or
resized to fill that rounded-up window. It just sits at its own unrounded
implicitWidth/implicitHeight.

At an integer display scale, text-shaping metrics for tooltipLabel resolve
to values close enough to whole pixels that Math.ceil(x) - x ≈ 0, so the
gap is imperceptible. At a fractional scale like 1.25x, label metrics no
longer land on clean logical-pixel boundaries, the ceil-rounding overshoot
becomes large enough to matter, and the resulting sliver of transparent
window background is exposed right where the border should be — on
whichever edge absorbs the rounding remainder (right/bottom, since the
bubble is anchored at 0,0 by default).

Fix

Anchor/size tooltipBubble to fill tooltipWindow instead of floating at
its own unrounded implicit size, e.g.:

BorderSurface {
  id: tooltipBubble
  implicitWidth: tooltipLabel.implicitWidth + 20
  implicitHeight: tooltipLabel.implicitHeight + 14
  width: tooltipWindow.width
  height: tooltipWindow.height
  ...
}

I verified this fix locally (via a full omarchy plugin clone omarchy.bar)
and it closes the gap. Note: cloning the bar itself isn't really a
supported customization path — Bar.qml has required propertys
(omarchyPath, barWidgetRegistry, barConfig) that the shell only wires
up for the literal built-in omarchy.bar id, so a cloned bar id fails to
construct (blank/missing bar) until you omarchy bar use omarchy.bar back.
Worth being aware of as a separate rough edge if bar-level user overrides
are ever meant to be supported.

Steps to reproduce

  1. Set display scale to 1.25x.
  2. Hover any bar widget/indicator that shows a tooltip (e.g. the Screen
    Recording indicator, or the YouTube Music widget).
  3. Observe the tooltip's border is missing on one edge.

Not reproducible at 1.6x, or other non-integer scales tested — see note
above.

System

  • Omarchy: 4.0.2-1
  • Hyprland: 0.56.2
  • Quickshell: 0.3.1
  • GPU: NVIDIA GeForce RTX 3080 Ti
  • CPU: AMD Ryzen 5 7500F

(omarchy debug isn't available as a command on this Omarchy version, so I
couldn't attach its generated log.)

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions