Skip to content

make the accent color setting apply consistently across the app #112

Description

@austin-smith

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions