fix(ui): respect window opacity and keep badges off the icons

Reviews of blocks C and D found five things a user would see immediately.

Row fills ignored the window's own opacity. Theme surfaces are fully opaque,
and GlobalStyleScope zeroes ChildBg below full opacity so WindowBg alone
carries the coverage -- with the default of 0.85 that made the sidebar a solid
block inside a translucent window. Idle rows now draw no fill at all, and the
active and hover fills are scaled by the current window opacity.

The unread badge landed on the tab icon at the default sidebar width of 44px.
Right-aligning it needs roughly 70px for one digit and 90px for three, and the
old placement also subtracted the popout column even when there was no popout
button. It is only drawn where it clears the icon; below that a plain dot takes
over, which is what the sidebar did before this cycle anyway.

The same collision existed in the top-tab strip, worse: the badge sat in the
trailing padding, which is 10px against a badge at least 14px wide, so it
covered the label on every tab that had one. The badge is part of the tab width
now, and vertically centred rather than top-aligned.

The context menu's spacing guard read the pushed zero back out of GetStyle, so
the max never did anything and X stayed at zero -- which is what HelpMarker's
SameLine uses, so the "(?)" clung to its label. It sets both axes outright now.

Section captions had all their padding above them and one pixel below, so with
zero item spacing the next row started immediately under the text.

Three smaller items: the tab icon was centred against the text font's line
height although FontAwesome is a fixed-width handle that ignores
Config.FontSizeV2; IconButton interpolated a label string per button per frame,
now a PushID over a u8 literal; and the alpha scaling that had grown four
copies now goes through ColourUtil.ApplyAlpha everywhere.
This commit is contained in:
2026-08-18 00:11:53 +02:00
parent 891f8ac0ec
commit 929188e5eb
8 changed files with 121 additions and 58 deletions
@@ -78,7 +78,6 @@ internal sealed class WidgetGalleryWindow : Window
{
IsActive = _rowActive && i == 1,
HoverAmount = HoverState.Query(id, hovered),
SurfaceAbgr = _palette.Abgr(Token.SurfaceBase, c),
SurfaceHoverAbgr = _palette.Abgr(Token.SurfaceHover, c),
SurfaceActiveAbgr = _palette.Abgr(Token.SurfaceActive, c),
AccentAbgr = _palette.Abgr(Token.AccentPrimary, c),