fix(noctalia): inherit NIconButton so bar widgets pick up global styling#143
Merged
Merged
Conversation
The previous BarWidgets were Item + Rectangle + NIcon + MouseArea assembled by hand, with hard-coded sizes — so changes in the Noctalia bar Settings (capsule color, outline, size, font scale, density) had no effect on them. They stayed pinned to whatever I'd picked. Both stoa-health and stoa-drive-pill now inherit NIconButton (the same component the official Clipboard, Plugin Manager and Workspace widgets use), with: • baseSize = Style.getCapsuleHeightForScreen(screen?.name) • applyUiScale = false • tooltipDirection= BarService.getTooltipDirection(screen?.name) • customRadius = Style.radiusL • colorBg = Style.capsuleColor • colorFg = the dynamic state color • colorBgHover = Color.mHover • colorBorder = "transparent" That makes them respond to bar Settings exactly like the built-in widgets — same capsule, same outline, same height per-screen, same hover behaviour. The health-status pulse animation is dropped: NIconButton manages its own opacity/hover transitions, and pulsing the whole button looked off against the rest of the bar. Severity is still obvious from colorFg. The `pulse` setting and its toggle are removed (manifest + Settings). The issue-count badge (stoa-health) and m/t badge (stoa-drive-pill) move to a Rectangle overlay anchored to the top-right of the button, z: 2, instead of an inline RowLayout child — keeps the badge visible without breaking the button's intrinsic size. stoa-health version 1.2.0.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the "bar Settings doesn't affect my widgets; they're stuck tiny" report. The previous BarWidgets were
Item + Rectangle + NIcon + MouseAreabuilt by hand — they ignored the global bar config (capsule color, outline, size, font scale, density) entirely. They stayed pinned to whatever I'd hard-coded.Both
stoa-healthandstoa-drive-pillnow inheritNIconButton— the same component the official Clipboard, Plugin Manager and Workspace widgets use — with the exact property bindings I read fromnoctalia-plugins/clipboard/BarWidget.qml:baseSizeStyle.getCapsuleHeightForScreen(screen?.name)applyUiScalefalsetooltipDirectionBarService.getTooltipDirection(screen?.name)customRadiusStyle.radiusLcolorBgStyle.capsuleColorcolorFgcolorBgHoverColor.mHovercolorBorder"transparent"Result: bar Settings tweaks (size, color, outline, density) now propagate into both widgets like they do for built-in ones.
Knock-on changes
NIconButtonruns its own opacity/hover transitions; pulsing the whole button looked off against the rest of the bar. Severity is still obvious fromcolorFg. Thepulsetoggle and manifest setting are removed.Rectangleanchored top-right withz: 2, instead of an inlineRowLayoutchild — keeps them visible without messing up the button's intrinsic size.stoa-healthbumped to 1.2.0.Test plan
[FAIL]line into~/.config/stoa/doctor.log→ red icon + count badge top-rightm/tbadge top-righthttps://claude.ai/code/session_01NS2BA7fzvSsp3ZhPzU18fL
Generated by Claude Code