Settings module: the wallpaper chooser moves in, and a Dark mode switch
CI / test (push) Failing after 16s
CI / test (push) Failing after 16s
- The session settings module becomes the panel's "Settings" button. Its popup lists the session switches, then a "Wallpaper" heading and the wallpapers (current one ticked); a click on a wallpaper shows it at once, as the old chooser did. Up/Down skip the heading. - The standalone wallpaper module and its world are removed. A saved panel.edn that lists "wallpaper" gets the settings module in its place (or just drops it when Settings is there). - New "Dark mode" setting (on by default). Off swaps the compositor to the Moon Day palette (ThemeTokens::moon_day, the values of config/themes/moon-day.json) for the shell, panel modules, window decorations and the switcher; on goes back to the configured theme. Saved in state.edn as :theme :light (absent or :dark: dark) and applied at startup by restore_state. - Tests: the native wallpaper test drives the settings module, the settings test flips Dark mode and checks the theme, the state.edn round trip covers :theme, panel migration unit test, and the host-wasm test covers the switches and the wallpaper rows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DPL5hgxf6exeYrDGcy4WW3
This commit is contained in:
26 files changed
+295
-878
No files matched your search
@@ -117,6 +117,30 @@ pub fn ThemeTokens::moon_night() -> ThemeTokens {
|
||||
}
|
||||
}
|
||||
|
||||
///| The light counterpart of `moon_night` (config/themes/moon-day.json): what the settings
|
||||
/// module's "Dark mode" switch turns to when off.
|
||||
pub fn ThemeTokens::moon_day() -> ThemeTokens {
|
||||
{
|
||||
name: "Moon Day",
|
||||
palette: {
|
||||
desktop_top: Rgba::from_hex("#cfe3ff"),
|
||||
desktop_bottom: Rgba::from_hex("#8fb4e8"),
|
||||
surface: Rgba::from_hex("#f4f6fbf2"),
|
||||
surface_hover: Rgba::from_hex("#dde3f0"),
|
||||
surface_popup: Rgba::from_hex("#fbfcfff5"),
|
||||
foreground: Rgba::from_hex("#1b2233"),
|
||||
foreground_muted: Rgba::from_hex("#5b6577"),
|
||||
accent: Rgba::from_hex("#3b6bff"),
|
||||
accent_foreground: Rgba::from_hex("#ffffff"),
|
||||
border: Rgba::from_hex("#b9c3d6"),
|
||||
},
|
||||
font_size: 14,
|
||||
radius: 6,
|
||||
spacing: 6,
|
||||
panel_height: 44,
|
||||
}
|
||||
}
|
||||
|
||||
///|
|
||||
fn json_str(obj : Map[String, Json], key : String, fallback : String) -> String {
|
||||
match obj.get(key) {
|
||||
|
||||
Reference in new issue
Block a user