Skip to content

fix: stabilize menu-bar icon on macOS 26#5

Open
g150446 wants to merge 1 commit into
Aboudjem:mainfrom
g150446:fix/menu-bar-icon-stability
Open

fix: stabilize menu-bar icon on macOS 26#5
g150446 wants to merge 1 commit into
Aboudjem:mainfrom
g150446:fix/menu-bar-icon-stability

Conversation

@g150446

@g150446 g150446 commented Jul 19, 2026

Copy link
Copy Markdown

Summary

This PR makes the menu-bar status item more stable on macOS 26 by:

  1. Rendering all three glyph states into the same natural-size canvas so the status slot width never changes when toggling between off / on / armed.
  2. Using a square-length status item with an explicit autosaveName and isVisible = true.
  3. Recreating the status item automatically if its backing button becomes nil.
  4. Replacing the layer-based pulse animation with an AppKit animator proxy to avoid touching NSStatusBarButton's layer, which can destabilize status items on newer macOS.

Related

Tested

  • Built with ./build.sh
  • App launches and runs without crashing
  • Status item is correctly created with a valid image and button

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Icon disappear right after I run the app

1 participant