Watch for OS theme changes at runtime
This commit is contained in:
@@ -169,11 +169,14 @@ and overwriting them fights its observer.
|
||||
- `Theme::change(mode, None, cx)` reproduces the native palette for the mode
|
||||
because the connector installed a `ThemeConfig` per variant.
|
||||
|
||||
Known gap (not addressed here): gpui-component's system-appearance follow is
|
||||
driven by window-activation events. A live OS theme change while the window
|
||||
is focused may not propagate on Linux until the window is re-focused;
|
||||
native-theme's `watch` feature (a theme-change watcher) is a possible
|
||||
follow-up, out of scope.
|
||||
Known gap (addressed since): gpui-component's system-appearance follow is
|
||||
driven by window-activation events. The app now enables native-theme's
|
||||
`watch` feature and re-applies the theme on its signal (`start_theme_watcher`
|
||||
in `desktop/src/main.rs`), so live OS changes apply without re-focusing or
|
||||
restarting. macOS reports appearance changes only (`AppleInterfaceTheme-
|
||||
ChangedNotification`); an accent-only change posts a different notification
|
||||
the watcher does not observe yet — Windows (`UISettings::ColorValuesChanged`),
|
||||
KDE (inotify on `kdeglobals`) and GNOME (portal `SettingChanged`) cover accent.
|
||||
|
||||
### 4.4 Settings dialog (`settings_dialog.rs`)
|
||||
|
||||
@@ -278,6 +281,5 @@ Unchanged:
|
||||
SVG assets.
|
||||
- theme-drawn widgets (`widgets` feature).
|
||||
- a preset-picker UI (`from_preset`) in settings.
|
||||
- runtime OS-theme watching (`watch` feature).
|
||||
- per-field user overrides layered on the native theme.
|
||||
- migrating `signed.json` into a native-theme `Theme` definition.
|
||||
|
||||
Reference in New Issue
Block a user