Skip to content

fix:set menu bar icon to use template image#5

Closed
hlucas13 wants to merge 1 commit into
domzilla:masterfrom
hlucas13:hlucas13_menubar-icon-fix
Closed

fix:set menu bar icon to use template image#5
hlucas13 wants to merge 1 commit into
domzilla:masterfrom
hlucas13:hlucas13_menubar-icon-fix

Conversation

@hlucas13
Copy link
Copy Markdown

This pull request makes a minor visual adjustment to the menu bar icon. The icon is now set as a template image, which allows it to automatically adapt to light and dark modes in macOS.

  • Set image.isTemplate = true for the menu bar icon in MenuBarController, enabling automatic adaptation to system appearance.

@NewYanko
Copy link
Copy Markdown

The latest update to Caffeine breaks the icon in the menu bar in light mode with a dark background:
Screenshot 2025-11-20 at 10 56 05

Hope this gets merged!

@NewYanko
Copy link
Copy Markdown

Made a testing build with

image.isTemplate = true

and it's working perfectly. Thanks @hlucas13 ! Hopefully this gets fixed in the main repo soon!

Screenshot 2025-11-20 at 11 08 44

@hlucas13
Copy link
Copy Markdown
Author

Made a testing build with

image.isTemplate = true

and it's working perfectly. Thanks @hlucas13 ! Hopefully this gets fixed in the main repo soon!

Screenshot 2025-11-20 at 11 08 44

@NewYanko thanks for confirming that the changes had the desired result, but I’ll have to close the PR, as the issue was fixed by @domzilla the following day in version 1.6.1. Just update it through the Caffeine menu.

@hlucas13 hlucas13 closed this Nov 20, 2025
@NewYanko
Copy link
Copy Markdown

Weird, the black icon screenshot I posted was after an update just this morning.. Anyways downloading from the website and replacing the .app worked, thanks!

bubbleee030 added a commit to bubbleee030/Caffeine that referenced this pull request May 19, 2026
domzilla#5 PreferencesView no longer writes CAAllowLidClose to UserDefaults twice.
   CaffeineViewModel.setAllowLidClose now only forwards the new flag to
   SleepPreventionManager; persistence is owned by PreferencesView's
   @AppStorage binding.

domzilla#6 SleepPreventionManager now releases its assertion IDs immediately when
   the user session resigns active, and re-engages immediately on become-
   active rather than waiting up to 10 s for the next timer tick. The old
   early-return in refreshAssertions left the manager's stored IDs in a
   stale state after the kernel timed them out at 30 s. Three new tests
   cover resign-releases, become-reengages, and become-while-inactive
   does nothing.

domzilla#7 CA_TEST_AUTOACTIVATE no longer writes to standard UserDefaults. The
   activate(...) function takes a new allowLidCloseOverride parameter so
   the test hook can drive a known state without mutating persistent
   preferences. The intentional early-return is documented in comments.

domzilla#8 LocalizationTests no longer relies on a single representative key
   ("Quit") to prove zh-Hant differs from zh-Hans. Asserts that at least
   half of all 31 user-facing values are non-identical across the two
   locales.

domzilla#9 About-dialog credits now point at github.com/bubbleee030/Caffeine
   instead of github.caffeine-app.net, in line with the README rewrite.
   Added a 2026 @bubbleee030 line to the copyright credits. Updated the
   source string in MenuBarController and the localized value in all 14
   .lproj/Localizable.strings files; LocalizationTests reflects the new
   key. No remaining caffeine-app.net references in the repo.
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.

2 participants