Rebuild /settings/appearance as the design form

The appearance route now opens with the design layout: serif "GENERAL"
overline + "Appearance" headline + intro paragraph, a four-tile
wallpaper picker (Dawn/Violet/Mint/Slate with active outline + check
glyph), a theme-mode segmented control, an accent swatch row, a
reduce-motion toggle, and a reset row. Every control mutates real state
through new shell methods (set_wallpaper_theme, set_theme_mode,
toggle_reduce_motion, reset_appearance) which delegate to the core.

The chrome lives in chrome::appearance_form so the page module is a
six-line shim. Light/Dark theme buttons currently switch the persisted
mode; rendering swaps will land when light/dark token sheets ship —
keeping the persistence so the eventual flip is one place.
This commit is contained in:
2026-05-09 18:50:33 -04:00
parent 9780fdbc8c
commit a35e0f7872
6 changed files with 432 additions and 231 deletions
+38 -1
View File
@@ -1,7 +1,7 @@
use ely_domain::{
ArchivePolicy, DiagnosticsReportingPolicy, DownloadPolicy, FavoriteLimit,
HistoryRecordingPolicy, NewTabDestination, ProfileId, ProfileSyncPolicy, SearchEngine,
SyncObjectKind, SyncObjectPolicy, UpdatePolicy,
SyncObjectKind, SyncObjectPolicy, ThemeMode, UpdatePolicy, WallpaperTheme,
};
use gpui::Context;
@@ -49,6 +49,43 @@ impl ElyShell {
}
}
pub(super) fn set_wallpaper_theme(
&mut self,
wallpaper: WallpaperTheme,
cx: &mut Context<Self>,
) {
if let ShellState::Ready(core) = &mut self.state {
core.set_wallpaper_theme(wallpaper);
cx.notify();
}
}
pub(super) fn set_theme_mode(
&mut self,
theme_mode: ThemeMode,
cx: &mut Context<Self>,
) {
if let ShellState::Ready(core) = &mut self.state {
core.set_theme_mode(theme_mode);
cx.notify();
}
}
pub(super) fn toggle_reduce_motion(&mut self, cx: &mut Context<Self>) {
if let ShellState::Ready(core) = &mut self.state {
let next = !core.appearance().reduce_motion();
core.set_reduce_motion(next);
cx.notify();
}
}
pub(super) fn reset_appearance(&mut self, cx: &mut Context<Self>) {
if let ShellState::Ready(core) = &mut self.state {
core.reset_appearance();
cx.notify();
}
}
pub(super) fn reset_general_settings(&mut self, cx: &mut Context<Self>) {
if let ShellState::Ready(core) = &mut self.state {
core.reset_general_settings();