Repository navigation
feat: let themes set how far the focused window's box reaches past the icon - #632
Conversation
…e icon The box behind the focused window's icon always reached 3 pt past it on each side and 2 pt above and below, so a theme could round it but not make it slimmer. paddingHorizontal and paddingVertical on focusedWindowStyle now set that reach, 3 and 2 pt when unset. While magnification zooms the icons, the box still hugs the icon as before. Tonhalle Line 1.1.1 uses it for a softer, slimmer box: 4 pt corners, 2 pt past the icon on each side and 1 pt above and below. The presentation example selects 1.1.1, and a new scene draws the padded box so the screens bot shows the change. Closes #627
|
No actionable comments were generated in the recent review. Walkthrough
Severity of issue fixed: Low Merge Risk:
|
Before and after
|
| Before | After |
|---|---|
![]() |
![]() |
Difference, changed pixels in red:
scenes/workspace-focused-window-padding-bar-light
| Before | After |
|---|---|
![]() |
![]() |
Difference, changed pixels in red:
148 unchanged screens
docs/essentials-clock-settings-dark, docs/essentials-clock-settings-light, docs/essentials-dark, docs/essentials-light, docs/essentials-settings-dark, docs/essentials-settings-light, docs/hero-dark, docs/hero-light, docs/popups-dark, docs/popups-light, docs/settings-dark, docs/settings-light, docs/themes-dark, docs/themes-light, scenes/accessibility-guide-dark, scenes/accessibility-guide-light, scenes/app-menu-popup-dark, scenes/app-menu-popup-light, scenes/apple-menu-settings-dark, scenes/apple-menu-settings-light, scenes/bottom-bar-popup-dark, scenes/bottom-bar-popup-light, scenes/chat-popup-dark, scenes/chat-popup-light, scenes/crowded-edit-bar-dark, scenes/crowded-edit-bar-light, scenes/dock-badges-bar-dark, scenes/dock-badges-bar-light, scenes/edit-bar-wide-group-dark, scenes/edit-bar-wide-group-light, scenes/essentials-clock-popup-dark, scenes/essentials-clock-popup-light, scenes/gruvbox-bar-dark, scenes/gruvbox-bar-light, scenes/horizontal-list-popup-dark, scenes/horizontal-list-popup-light, scenes/increase-contrast-bar-dark, scenes/increase-contrast-bar-light, scenes/increase-contrast-popup-dark, scenes/increase-contrast-popup-light, scenes/input-source-popup-dark, scenes/input-source-popup-light, scenes/notch-flare-bar-dark, scenes/notch-flare-bar-light, scenes/privacy-both-bar-dark, scenes/privacy-both-bar-light, scenes/privacy-hide-when-idle-bar-dark, scenes/privacy-hide-when-idle-bar-light, scenes/privacy-idle-bar-dark, scenes/privacy-idle-bar-light, scenes/privacy-microphone-bar-dark, scenes/privacy-microphone-bar-light, scenes/privacy-settings-dark, scenes/privacy-settings-light, scenes/reduce-transparency-bar-dark, scenes/reduce-transparency-bar-light, scenes/reduce-transparency-glass-bar-dark, scenes/reduce-transparency-glass-bar-light, scenes/settings-bar-dark, scenes/settings-bar-light, scenes/settings-bar-placement-bottom-dark, scenes/settings-bar-placement-bottom-light, scenes/settings-bar-placement-dark, scenes/settings-bar-placement-light, scenes/settings-crashes-dark, scenes/settings-crashes-light, scenes/settings-feedback-dark, scenes/settings-feedback-light, scenes/settings-general-dark, scenes/settings-general-light, scenes/settings-general-macos15-dark, scenes/settings-general-macos15-light, scenes/settings-general-move-dark, scenes/settings-general-move-failed-dark, scenes/settings-general-move-failed-light, scenes/settings-general-move-light, scenes/settings-general-move-moving-dark, scenes/settings-general-move-moving-light, scenes/settings-general-move-replace-dark, scenes/settings-general-move-replace-light, scenes/settings-general-setup-open-dark, scenes/settings-general-setup-open-light, scenes/settings-general-spaces-dark, scenes/settings-general-spaces-light, scenes/settings-help-dark, scenes/settings-help-light, scenes/settings-help-starred-dark, scenes/settings-help-starred-light, scenes/settings-narrow-dark, scenes/settings-narrow-light, scenes/settings-package-dark, scenes/settings-package-light, scenes/settings-package-widget-dark, scenes/settings-package-widget-light, scenes/settings-theme-dark, scenes/settings-theme-light, scenes/settings-uninstall-dark, scenes/settings-uninstall-failed-dark, scenes/settings-uninstall-failed-light, scenes/settings-uninstall-light, scenes/settings-widget-backgrounds-dark, scenes/settings-widget-backgrounds-light, scenes/settings-workspace-hidden-dark, scenes/settings-workspace-hidden-light, scenes/setup-look-below-menu-bar-dark, scenes/setup-look-dark, scenes/setup-look-no-notch-dark, scenes/setup-move-existing-dark, scenes/setup-move-failed-dark, scenes/setup-move-ready-dark, scenes/setup-move-replace-dark, scenes/setup-omniwm-connection-dark, scenes/setup-permissions-dark, scenes/setup-permissions-spaces-dark, scenes/setup-permissions-spaces-ready-dark, scenes/setup-placement-bottom-dark, scenes/setup-placement-dark, scenes/setup-touches-dark, scenes/setup-touches-macos15-dark, scenes/setup-touches-spaces-dark, scenes/setup-try-dark, scenes/setup-yabai-connection-dark, scenes/slider-end-stop-popup-dark, scenes/slider-end-stop-popup-light, scenes/stablebar-widget-bar-dark, scenes/stablebar-widget-bar-light, scenes/stablebar-widget-settings-dark, scenes/stablebar-widget-settings-light, scenes/starter-bar-dark, scenes/starter-bar-light, scenes/starter-edit-bar-dark, scenes/starter-edit-bar-light, scenes/system-monitor-memory-bar-dark, scenes/system-monitor-memory-bar-light, scenes/system-monitor-shows-settings-dark, scenes/system-monitor-shows-settings-light, scenes/update-popup-dark, scenes/update-popup-light, scenes/update-popup-star-github-cli-dark, scenes/update-popup-star-github-cli-light, scenes/update-popup-star-thanks-dark, scenes/update-popup-star-thanks-light, scenes/workspace-badges-bar-dark, scenes/workspace-badges-bar-light, scenes/workspace-focused-window-bar-dark, scenes/workspace-focused-window-bar-light, scenes/workspace-hidden-apps-bar-dark, scenes/workspace-hidden-apps-bar-light
Visual review: 2 changed screens approved.
|
🎉 This PR is included in version 0.15.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |






Problem
The focused window's box always reaches 3 pt past the icon on each side and 2 pt above and below, so a theme can round it but not make it slimmer. Closes #627.
Changes
paddingHorizontalandpaddingVerticalonfocusedWindowStyleset how far the box reaches past the icon. They default to 3 and 2 pt, so existing setups look the same. While magnification zooms the icons, the box still hugs the icon: at most 2 pt beside it and none above and below.focusedWindowStyleis a style, so the schema and the decoder already accept both; the box ignored them until now. Older builds still load a file that sets them.workspaceDefaults.focusedWindowStylesetscornerRadius: 4,paddingHorizontal: 2andpaddingVertical: 1: an 18 × 16 pt box with 4 pt corners instead of a square 20 × 18 pt one. Like any theme value there, it turns the box on for workspace widgets that don't setfocusedWindowStyle, andnullturns it off; both checked with a render. 1.1.1 needs StableBar 0.15 or later, since 0.14 doesn't knowfocusedWindowStyle. The presentation example selects 1.1.1, and its test expects it.docs/widgets.mdgives the box's default reach, the two keys and how it behaves with magnification.docs/themes.mddescribes 1.1.1.scenes/workspace-focused-window-padding-bar.jsonsets the same box on the built-in look.mainignores the padding, so the screens bot shows the difference.focusedWindowStyleproperty. Settings has only the on/off toggle for this box, which is unchanged.Testing
swift build --build-tests;swift test --filteron the Tonhalle example, presentation, scene, style, schema and customization tests: 84 Swift Testing and 4 XCTest tests pass.scripts/check.sh --quickand commitlint pass.StableBar --validateon a scratch copy of the presentation example with 1.1.1 installed: valid, 18 widgets in 5 files. The theme's ownconfig.jsonvalidates too."windows": trueand Terminal focused, in dark and light.Merging
One commit, any merge method. #631 stops the box changing shape on hover without magnification. It touches another part of
BarView.swift, and the two merge cleanly in either order.Claude Opus 5.5 via Claude Code