diff --git a/CHANGELOG.md b/CHANGELOG.md index f7e3713..1d237f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed +- Menu bar icon is visible on macOS Tahoe 26.6.1 (build 25G76). - Timer no longer stays active and shows negative seconds after the Mac sleeps past the activation period. ## [1.6.3] - 2026-01-26 diff --git a/src/Caffeine/Classes/AppDelegate.swift b/src/Caffeine/Classes/AppDelegate.swift index 5a9ca3f..05732c6 100644 --- a/src/Caffeine/Classes/AppDelegate.swift +++ b/src/Caffeine/Classes/AppDelegate.swift @@ -20,11 +20,11 @@ class AppDelegate: NSObject, NSApplicationDelegate, SPUStandardUserDriverDelegat private var menuBarController: MenuBarController? func applicationDidFinishLaunching(_: Notification) { + // Hide the dock icon before creating the menu bar-only interface + NSApp.setActivationPolicy(.accessory) + // Create the menu bar controller self.menuBarController = MenuBarController(updaterController: self.updaterController) - - // Hide the dock icon - this is a menu bar only app - NSApp.setActivationPolicy(.accessory) } func applicationWillTerminate(_: Notification) { diff --git a/src/Caffeine/Classes/Views/MenuBarController.swift b/src/Caffeine/Classes/Views/MenuBarController.swift index 8747766..dae5b0c 100644 --- a/src/Caffeine/Classes/Views/MenuBarController.swift +++ b/src/Caffeine/Classes/Views/MenuBarController.swift @@ -38,11 +38,12 @@ class MenuBarController: NSObject { } private func setupMenuBar() { - self.statusItem = NSStatusBar.system.statusItem(withLength: NSStatusItem.variableLength) + self.statusItem = NSStatusBar.system.statusItem(withLength: NSStatusItem.squareLength) guard let button = statusItem?.button else { return } // Set up button actions (icon will be set after observers are configured) + button.imagePosition = .imageOnly button.action = #selector(self.statusItemClicked(_:)) button.target = self button.sendAction(on: [.leftMouseUp, .rightMouseUp])