Skip to content

Add Follow system theme mode#1363

Open
jacob-sinex wants to merge 1 commit into
QuantumBadger:masterfrom
jacob-sinex:follow-system-theme-mode
Open

Add Follow system theme mode#1363
jacob-sinex wants to merge 1 commit into
QuantumBadger:masterfrom
jacob-sinex:follow-system-theme-mode

Conversation

@jacob-sinex

Copy link
Copy Markdown

Adds an optional "Follow system theme" setting that switches between a light and
a dark theme automatically, based on the device's dark-mode setting.

When enabled, separate "Light theme" and "Dark theme" selectors are shown (a
single "Theme" selector otherwise), and the active theme carries across the
toggle so it isn't replaced by a value the user never chose. The quick theme
selector in the options menu also becomes mode-aware while following the system,
offering only the current mode's themes so every choice changes what's on screen.

pmd, checkstyle, lint, test and assembleRelease all pass locally; tested on-device.

Closes #1241

Adds an optional "Follow system theme" setting that switches between a
light and a dark theme automatically based on the device's dark-mode
setting.

Settings (Appearance):
- When "Follow system theme" is enabled, separate "Light theme" and
  "Dark theme" selectors are shown; when disabled, a single "Theme"
  selector is shown.
- The currently-active theme is carried across the toggle so it is not
  replaced by a stale value the user never chose: disabling adopts the
  active light/dark theme into the single Theme, and enabling routes the
  single Theme into its natural light or dark slot (themes are inherently
  one or the other). The selector rows update their shown selection
  immediately.

Quick theme selector (options menu):
- While following the system theme, it offers only the themes for the
  current mode (titled "Light theme"/"Dark theme") and writes to that
  mode's key, so every choice changes the theme currently on screen
  instead of silently doing nothing. Behaviour is unchanged when not
  following the system.

Theme resolution (PrefsUtility): when following the system theme, the
active theme is resolved from the light or dark selection according to
the current uiMode night flag.
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.

[Feature Request] Dark\light theme selection synced to system settings.

1 participant