Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions Sources/CodexBar/PreferencesAdvancedPane.swift
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,6 @@ struct AdvancedPane: View {
title: L("surprise_me_title"),
subtitle: L("surprise_me_subtitle"),
binding: self.$settings.randomBlinkEnabled)
PreferenceToggleRow(
title: "Color-coded icons",
subtitle: "Tint menu bar icons green, yellow, or red based on session usage.",
binding: self.$settings.colorCodedIcons)
PreferenceToggleRow(
title: L("weekly_limit_confetti_title"),
subtitle: L("weekly_limit_confetti_subtitle"),
Expand Down
4 changes: 4 additions & 0 deletions Sources/CodexBar/PreferencesDisplayPane.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ struct DisplayPane: View {
binding: self.$settings.menuBarShowsHighestUsage)
.disabled(!self.settings.mergeIcons)
.opacity(self.settings.mergeIcons ? 1 : 0.5)
PreferenceToggleRow(
title: "Color-coded icons",
subtitle: "Tint menu bar icons green, yellow, or red based on session usage.",
binding: self.$settings.colorCodedIcons)
PreferenceToggleRow(
title: L("menu_bar_shows_percent_title"),
subtitle: L("menu_bar_shows_percent_subtitle"),
Expand Down
1 change: 1 addition & 0 deletions Sources/CodexBar/SettingsStore+MenuObservation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ extension SettingsStore {
_ = self.menuBarShowsBrandIconWithPercent
_ = self.menuBarShowsHighestUsage
_ = self.menuBarDisplayMode
_ = self.menuBarSeparatorStyle
_ = self.kiroMenuBarDisplayMode
_ = self.historicalTrackingEnabled
_ = self.multiAccountMenuLayout
Expand Down
9 changes: 8 additions & 1 deletion Sources/CodexBar/StatusItemController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -362,9 +362,16 @@ final class StatusItemController: NSObject, NSMenuDelegate, StatusItemControllin

// On macOS 26+, usage colors are baked into non-template images. Re-render when the system
// appearance changes so dynamic colors (systemGreen/Orange/Red) resolve to their new values.
// The render-skip signatures don't encode appearance, so clear them first — otherwise an
// unchanged usage/status value would short-circuit the re-render and leave the stale bitmap.
if #available(macOS 26, *) {
self.appearanceObservation = NSApp.observe(\.effectiveAppearance) { [weak self] _, _ in
Task { @MainActor in self?.updateIcons() }
Task { @MainActor in
guard let self else { return }
self.lastAppliedMergedIconRenderSignature = nil
self.lastAppliedProviderIconRenderSignatures.removeAll()
self.updateIcons()
}
}
}
}
Expand Down