Summary
The Accent Color setting is only partially implemented. Changing it has an inconsistent effect across macOS and iOS, and the macOS controls for selecting a color do not behave the same way.
Goal
Implement the accent color setting according to Apple’s current SwiftUI best practices and apply it consistently throughout the app.
Findings
The macOS selectors follow different update paths
The Accent Color menu picker binds directly to ThemeManager.currentAccentColorOption. This changes the value displayed by the picker, but does not update ThemeManager.accentColor or persist the selection.
The color swatches call ThemeManager.setAccentColor(_:), which updates the selected option, active color, and saved preference. This is why selecting a color from the swatches has more effect than selecting the same color from the menu.
Accent color state can become inconsistent
ThemeManager stores the selected option and rendered accent color as separate mutable properties:
currentAccentColorOption
accentColor
These values remain synchronized only when changes go through setAccentColor(_:). Direct bindings can update one without updating the other.
Accent styling is not applied consistently
The app currently uses several different mechanisms:
.accentColor(themeManager.accentColor)
.tint(themeManager.accentColor)
Color.accentColor and Color.accent
- direct use of
themeManager.accentColor
- fixed colors in individual views
The main app scenes still use accentColor(_:), while some other views and scenes use tint(_:) or receive the color directly. Because these values propagate through SwiftUI view hierarchies, separately rooted windows and views can behave differently.
Deprecated API usage
The main app scenes still use accentColor(_:), while some other views and scenes use tint(_:) or receive the color directly. Because these values propagate through SwiftUI view hierarchies, separately rooted windows and views can behave differently.
Apple marks accentColor(_:) as deprecated and recommends using the app accent color or tint(_:) instead.
macOS has additional system behavior
Apple documents that app accent-color customization on macOS interacts with the user’s system Accent Color preference. This needs to be accounted for when evaluating the current behavior and deciding what BitDream’s setting should control.
Apple documentation
Summary
The Accent Color setting is only partially implemented. Changing it has an inconsistent effect across macOS and iOS, and the macOS controls for selecting a color do not behave the same way.
Goal
Implement the accent color setting according to Apple’s current SwiftUI best practices and apply it consistently throughout the app.
Findings
The macOS selectors follow different update paths
The Accent Color menu picker binds directly to
ThemeManager.currentAccentColorOption. This changes the value displayed by the picker, but does not updateThemeManager.accentColoror persist the selection.The color swatches call
ThemeManager.setAccentColor(_:), which updates the selected option, active color, and saved preference. This is why selecting a color from the swatches has more effect than selecting the same color from the menu.Accent color state can become inconsistent
ThemeManagerstores the selected option and rendered accent color as separate mutable properties:currentAccentColorOptionaccentColorThese values remain synchronized only when changes go through
setAccentColor(_:). Direct bindings can update one without updating the other.Accent styling is not applied consistently
The app currently uses several different mechanisms:
.accentColor(themeManager.accentColor).tint(themeManager.accentColor)Color.accentColorandColor.accentthemeManager.accentColorThe main app scenes still use
accentColor(_:), while some other views and scenes usetint(_:)or receive the color directly. Because these values propagate through SwiftUI view hierarchies, separately rooted windows and views can behave differently.Deprecated API usage
The main app scenes still use
accentColor(_:), while some other views and scenes usetint(_:)or receive the color directly. Because these values propagate through SwiftUI view hierarchies, separately rooted windows and views can behave differently.Apple marks
accentColor(_:)as deprecated and recommends using the app accent color ortint(_:)instead.macOS has additional system behavior
Apple documents that app accent-color customization on macOS interacts with the user’s system Accent Color preference. This needs to be accounted for when evaluating the current behavior and deciding what BitDream’s setting should control.
Apple documentation
tint(_:)— sets the tint color within a view hierarchy and documents platform- and control-specific behavior.ShapeStyle.tint— reflects the current tint color.accentColor(_:)— deprecated in favor of the app accent color ortint(_:); also documents the macOS system preference interaction.Color.accentColor— the color reflecting the system or app accent color.