Repository navigation
fix: keep workspace numbers in step with the bar's light or dark appearance - #672
Conversation
…arance With AeroSpace, each workspace cell draws its content in a hosting view of its own, fed a copy of the bar's environment in updateNSView. SwiftUI calls updateNSView again only for the environment values it read there, so switching the bar from Light to Dark left the copy in Light, and numbers kept their Light colours on Dark fills, such as a white number on Fern's green focus. Read the colour scheme and contrast when handing the environment on, in the workspace cells and icons and in the equalizer and scrolling text, which copy it the same way. Closes #669
|
No actionable comments were generated in the recent review. Walkthrough
Severity of issue fixed: Low Merge Risk:
|
Before and after
156 unchanged screens
Visual review: 156 screens, none changed. |
## [0.16.0](v0.15.0...v0.16.0) (2026-11-16) ### Features * add a built-in Disk widget with a popup to eject drives ([#680](#680)) by @M4n0x ([de1cb14](de1cb14)), closes [#222](#222) * add a ring block and combine providers for compact status widgets ([#699](#699)) by @Seb-GRAF ([e05956c](e05956c)) * delete a profile from Settings → Profiles ([#668](#668)) by @M4n0x ([c2d43d4](c2d43d4)), closes [#667](#667) * let a popup slider draw as a filled pill in the theme's colors ([#644](#644)) by @M4n0x ([f0d2f2c](f0d2f2c)), closes [#642](#642) [#642](#642) * let a symbol fill, or take another variant, while a state is active ([#650](#650)) by @M4n0x ([b57ad13](b57ad13)), closes [#649](#649) * match profiles to the theme the bar is drawn with ([#697](#697)) by @M4n0x ([8e98afd](8e98afd)) * open themes from stablebar links to try and install them ([#683](#683)) by @M4n0x ([b45ecee](b45ecee)) * share one padding, spacing and gap across popups ([#665](#665)) by @M4n0x ([65c6a73](65c6a73)), closes [#664](#664) * show a menu bar item on the bar as macOS draws it ([#640](#640)) by @Jonathanm10 ([47a0286](47a0286)), closes [#639](#639) * show Disk Utility's free space and offer a meter on the Disk widget ([#688](#688)) by @M4n0x ([6c3c16b](6c3c16b)) * undo, find and keep quotes straight when editing as JSON ([#685](#685)) by @M4n0x ([4066c68](4066c68)) ### Bug Fixes * keep a workspace switch from redrawing every widget on the bar by @M4n0x ([e5a4ebb](e5a4ebb)), closes [#670](#670) * keep popups under the bar when their shadow reaches into the menu bar by @M4n0x ([ba2edab](ba2edab)), closes [#643](#643) * keep the shadow margin of hover controls and trays from catching clicks on the bar ([#661](#661)) by @M4n0x ([8196fd9](8196fd9)), closes [#660](#660) * keep the update popup on the newest release while an update waits ([#654](#654)) by @M4n0x ([8c78bd4](8c78bd4)), closes [#653](#653) * keep workspace numbers in step with the bar's light or dark appearance ([#672](#672)) by @M4n0x ([3866e2c](3866e2c)), closes [#669](#669) * leave Option-key alternates out of app menus ([#655](#655)) by [@amar9elbeg](https://github.com/amar9elbeg) ([f65703c](f65703c)) * open menu bar items on the bar on right-click and keep Edit Widget… on the grid symbol ([#663](#663)) by @M4n0x ([10c09ef](10c09ef)), closes [#662](#662) [#662](#662) * reopen an app when OmniWM can't focus a window it still lists by @Jonathanm10 ([5dda2f4](5dda2f4)), closes [#651](#651) * show a dropped workspace connection in Settings while reconnecting ([#694](#694)) by @Jonathanm10 ([f630ba8](f630ba8)), closes [#693](#693) * stop a closed Settings window from redrawing with every bar update ([#674](#674)) by @M4n0x ([77b5383](77b5383)), closes [#671](#671) * stop crafted tokens and settings from freezing StableBar while it loads ([#678](#678)) by @M4n0x ([435881d](435881d)) * warn only the part of a System monitor that is over its threshold ([#646](#646)) by @M4n0x ([388115b](388115b)), closes [#645](#645) [#645](#645) ### Performance Improvements * tell whether a display has workspaces without filtering their windows by @M4n0x ([391b899](391b899))
|
🎉 This PR is included in version 0.16.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Problem
With AeroSpace, workspace numbers can keep their Light colours after the bar turns Dark. On Fern, the focused number turned white on the green fill instead of dark green. Fixes #669.
Changes
Each workspace cell, and each app icon in it, draws its content in a hosting view of its own, fed a copy of the bar's environment in
updateNSView. SwiftUI callsupdateNSViewagain only for the environment values it read there, and nothing read the colour scheme. So after a switch from Light to Dark the copy stayed Light, while the fills, drawn outside those views, switched.NSViewRepresentableContext.nestedEnvironment(WidgetDragView.swift) returns the context's environment after reading its colour scheme and contrast, so SwiftUI callsupdateNSViewwhen either changes.Testing
workspaceLabelsFollowTheBarFromLightToDarkdraws a focused cell whose number is red in Light and green in Dark, in a window that starts Light and turns Dark, and counts the pixels of each. It fails onmain(the number stays red) and passes with the fix, three runs out of three. It waits by counted run-loop polls.swift test --filter 'Workspace|workspace|Equalizer|equalizer|Scrolling|scrolling|NativePresentation|WidgetDrag|nowPlaying|NowPlaying': 119 Swift Testing and 39 XCTest cases pass. The full suite is left to CI.scripts/check.sh --quickand--commitspass.The screens bot can't show this change: scenes draw one appearance and never switch it. These images come from an offscreen window, first drawn in Light (top row), switched to Dark (middle), then with focus on an empty workspace (bottom):
The live bar before the fix:
Merging
One commit; any merge method works, and a squash keeps its
fix:title.Claude Opus 5.5 via Claude Code