Use SF Symbol for the menu bar icon (fixes #27) - #54
Open
timokox wants to merge 1 commit into
Open
Conversation
Issue bhaller#27: the photo-realistic application icon used as the status- bar image is not very Mac-like in modern menu bars where everything else is a thin template glyph. On macOS 11+ switch to the SF Symbol "cursorarrow.motionlines" — a cursor with motion lines, which fits Jiggler's metaphor much better than the literal product icon. The image is set as a template so the system handles light/dark menu bar appearance. State changes (active jiggling green, timed-quit countdown red) move from pre-tinted image variants to NSStatusBarButton.contentTintColor, which is cleaner and adapts to system accent colours. On macOS 10.15, and for any user who explicitly opts back to the original icon, keep the classic three-image setup unchanged. Opt in to the classic icon with: defaults write com.stick.app.jiggler UseClassicMenuBarIcon -bool YES The three classic-icon ivars (scaledJigglerImage, …Red, …Green) are only allocated when we are actually going to use them, so SF-Symbol mode skips creating them entirely. -fixStatusItemIcon picks the mode by checking whether scaledJigglerImage exists. Build clean.
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.
Addresses #27 — "the current menu bar icon is photo-realistic and thus not very Mac-like".
Change
On macOS 11+, switch the status-bar icon from the photo-realistic application icon (
NSImageNameApplicationIcon) to the SF Symbolcursorarrow.motionlines— a cursor with motion lines, which is a much better metaphor for what Jiggler does and matches the visual style of the rest of the modern menu bar.cursorarrow.motionlinesas a template image, state viaNSStatusBarButton.contentTintColorBackwards-compat / opt-back
On macOS 10.15 (the deployment target), the SF Symbol API isn't available, so the existing classic-icon path is used unchanged.
Any user who prefers the original icon can opt back with:
No new visible UI. Matches the README's "please try to keep the user interface simple and comprehensible" guidance.
Code shape
The three
scaledJiggler*Imageivars are only allocated when the classic path is going to be used, so the SF-Symbol path skips creating them entirely.-fixStatusItemIconpicks the mode by checkingscaledJigglerImage != nil. Template-image mode means the menu bar handles light/dark automatically.Verification
xcodebuild -configuration Debug build→ BUILD SUCCEEDED, no warnings. Both modes (default +UseClassicMenuBarIcon = YES) smoke-tested alive.Why this and not a Preferences toggle?
A real opt-in pref would need a checkbox added to Preferences.xib, which is a bigger change with cross-version XIB risk. The defaults-only knob keeps this PR strictly to the cursor-style change. If you'd prefer a checkbox, I'm happy to add one.