From 2788d3c46731e906e5b57195179edc991dbce81d Mon Sep 17 00:00:00 2001 From: Ashley Wulber Date: Fri, 22 Sep 2023 11:17:57 -0400 Subject: [PATCH 01/27] chore(appearance): add interface i18n phrases --- i18n/en/cosmic_settings.ftl | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/i18n/en/cosmic_settings.ftl b/i18n/en/cosmic_settings.ftl index 5a1105cc..ff26544c 100644 --- a/i18n/en/cosmic_settings.ftl +++ b/i18n/en/cosmic_settings.ftl @@ -13,6 +13,35 @@ desktop = Desktop appearance = Appearance .desc = Accent colors and COSMIC theming. +mode-and-colors = Mode and Colors + .auto-switch = Automatically switch from Light to Dark mode + .desc = Switches to Light mode at sunrise + .accent-color = Accent color + .app-background = Application or window background + .container-background = Container background + .desc-detail = Container background color is used for navigation sidebar, side drawer, dialogs and similar widgets. By default, it is automatically derived from the Application or window background. + .reset = Reset to auto + .desc = Primary container color is used for navigation sidebar, side drawer, dialogs and similar widgets. + .text-tint = Interface text tint + .desc = Color used to derive interface text colors that have sufficient contrast on various surfaces. + .control-tint = Control component tint + .desc = Used for backgrounds of standard buttons, search inputs, text inputs, and similar components. + .window-hint-accent = Use theme accent color as active window hint +hex = Hex +rgb = RGB + +style = Style + .round = Round + .slightly-round = Slightly round + .square = Square + .frosted = Frosted glass effect on system interface + .desc = Applies background blur to panel, dock, applets, launcher, and application library. + +# interface density left out for now + +window-management = Window Management + .active-hint = Active window hint size + .gaps = Gaps around tiled windows ## Desktop: Notifications notifications = Notifications From 4aee7de9195e367361b67ad0d6cf58ced43ad5a2 Mon Sep 17 00:00:00 2001 From: Ashley Wulber Date: Fri, 22 Sep 2023 12:13:38 -0400 Subject: [PATCH 02/27] wip: appearance page skeleton --- app/src/app.rs | 8 ++- app/src/pages/desktop/appearance.rs | 88 ++++++++++++++++++++++++++++- app/src/pages/mod.rs | 1 + i18n/en/cosmic_settings.ftl | 30 +++++----- 4 files changed, 110 insertions(+), 17 deletions(-) diff --git a/app/src/app.rs b/app/src/app.rs index 4b38e23c..560c0c91 100644 --- a/app/src/app.rs +++ b/app/src/app.rs @@ -19,7 +19,7 @@ use cosmic_settings_page::{self as page, section}; use crate::config::Config; use crate::pages::desktop::{ - self, + self, appearance, dock::{self, applets::ADD_DOCK_APPLET_DIALOGUE_ID}, panel::{ self, @@ -245,6 +245,12 @@ impl cosmic::Application for SettingsApp { return page.update(message).map(cosmic::app::Message::App); } } + crate::pages::Message::Appearance(message) => { + if let Some(page) = self.pages.page_mut::() { + page.update(message); + } + // TODO + } }, Message::PanelConfig(config) if config.name.to_lowercase().contains("panel") => { diff --git a/app/src/pages/desktop/appearance.rs b/app/src/pages/desktop/appearance.rs index 9680cd7e..0d3bb6b1 100644 --- a/app/src/pages/desktop/appearance.rs +++ b/app/src/pages/desktop/appearance.rs @@ -1,6 +1,10 @@ // Copyright 2023 System76 // SPDX-License-Identifier: GPL-3.0-only +use apply::Apply; +use cosmic::iced_core::Length; +use cosmic::widget::{container, settings, text}; +use cosmic::Element; use cosmic_settings_page::Section; use cosmic_settings_page::{self as page, section}; use slotmap::SlotMap; @@ -8,12 +12,25 @@ use slotmap::SlotMap; #[derive(Default)] pub struct Page; +#[derive(Debug, Copy, Clone)] +pub enum Message {} + +impl Page { + pub fn update(&mut self, message: Message) { + // TODO + } +} + impl page::Page for Page { fn content( &self, sections: &mut SlotMap>, ) -> Option { - Some(vec![sections.insert(Section::default())]) + Some(vec![ + sections.insert(mode_and_colors()), + sections.insert(style()), + sections.insert(window_management()), + ]) } fn info(&self) -> page::Info { @@ -23,4 +40,73 @@ impl page::Page for Page { } } +#[allow(clippy::too_many_lines)] +pub fn mode_and_colors() -> Section { + Section::default() + .title(fl!("mode-and-colors")) + .descriptions(vec![ + fl!("auto-switch"), + fl!("auto-switch", "desc"), + fl!("accent-color"), + fl!("app-background"), + fl!("container-background"), + fl!("container-background", "desc-detail"), + fl!("container-background", "reset"), + fl!("container-background", "desc"), + fl!("text-tint"), + fl!("text-tint", "desc"), + fl!("control-tint"), + fl!("control-tint", "desc"), + fl!("window-hint-accent"), + ]) + .view::(|_binder, page, section| { + let descriptions = §ion.descriptions; + + settings::view_section(§ion.title) + .add(container(text("TODO")).width(Length::Fill)) + .apply(Element::from) + .map(crate::pages::Message::Appearance) + }) +} + +#[allow(clippy::too_many_lines)] +pub fn style() -> Section { + Section::default() + .title(fl!("style")) + .descriptions(vec![ + fl!("style"), + fl!("style", "round"), + fl!("style", "slightly-round"), + fl!("style", "square"), + fl!("frosted"), + fl!("frosted", "desc"), + ]) + .view::(|_binder, page, section| { + let descriptions = §ion.descriptions; + + settings::view_section(§ion.title) + .add(container(text("TODO")).width(Length::Fill)) + .apply(Element::from) + .map(crate::pages::Message::Appearance) + }) +} + +#[allow(clippy::too_many_lines)] +pub fn window_management() -> Section { + Section::default() + .title(fl!("window-management")) + .descriptions(vec![ + fl!("window-management", "active-hint"), + fl!("window-management", "gaps"), + ]) + .view::(|_binder, page, section| { + let descriptions = §ion.descriptions; + + settings::view_section(§ion.title) + .add(container(text("TODO")).width(Length::Fill)) + .apply(Element::from) + .map(crate::pages::Message::Appearance) + }) +} + impl page::AutoBind for Page {} diff --git a/app/src/pages/mod.rs b/app/src/pages/mod.rs index 1e3ebc9c..238d69ef 100644 --- a/app/src/pages/mod.rs +++ b/app/src/pages/mod.rs @@ -20,6 +20,7 @@ pub enum Message { DesktopWallpaper(desktop::wallpaper::Message), PanelApplet(desktop::panel::applets_inner::Message), DockApplet(desktop::dock::applets::Message), + Appearance(desktop::appearance::Message), Input(input::Message), External { id: String, message: Vec }, Page(Entity), diff --git a/i18n/en/cosmic_settings.ftl b/i18n/en/cosmic_settings.ftl index ff26544c..0bb7cd13 100644 --- a/i18n/en/cosmic_settings.ftl +++ b/i18n/en/cosmic_settings.ftl @@ -14,19 +14,19 @@ appearance = Appearance .desc = Accent colors and COSMIC theming. mode-and-colors = Mode and Colors - .auto-switch = Automatically switch from Light to Dark mode - .desc = Switches to Light mode at sunrise - .accent-color = Accent color - .app-background = Application or window background - .container-background = Container background - .desc-detail = Container background color is used for navigation sidebar, side drawer, dialogs and similar widgets. By default, it is automatically derived from the Application or window background. - .reset = Reset to auto - .desc = Primary container color is used for navigation sidebar, side drawer, dialogs and similar widgets. - .text-tint = Interface text tint - .desc = Color used to derive interface text colors that have sufficient contrast on various surfaces. - .control-tint = Control component tint - .desc = Used for backgrounds of standard buttons, search inputs, text inputs, and similar components. - .window-hint-accent = Use theme accent color as active window hint +auto-switch = Automatically switch from Light to Dark mode + .desc = Switches to Light mode at sunrise +accent-color = Accent color +app-background = Application or window background +container-background = Container background + .desc-detail = Container background color is used for navigation sidebar, side drawer, dialogs and similar widgets. By default, it is automatically derived from the Application or window background. + .reset = Reset to auto + .desc = Primary container color is used for navigation sidebar, side drawer, dialogs and similar widgets. +text-tint = Interface text tint + .desc = Color used to derive interface text colors that have sufficient contrast on various surfaces. +control-tint = Control component tint + .desc = Used for backgrounds of standard buttons, search inputs, text inputs, and similar components. +window-hint-accent = Use theme accent color as active window hint hex = Hex rgb = RGB @@ -34,8 +34,8 @@ style = Style .round = Round .slightly-round = Slightly round .square = Square - .frosted = Frosted glass effect on system interface - .desc = Applies background blur to panel, dock, applets, launcher, and application library. +frosted = Frosted glass effect on system interface + .desc = Applies background blur to panel, dock, applets, launcher, and application library. # interface density left out for now From 4f73aeed3d11c21ffef8481053d7e146540c0de4 Mon Sep 17 00:00:00 2001 From: Ashley Wulber Date: Fri, 22 Sep 2023 14:14:44 -0400 Subject: [PATCH 03/27] wip: more work on the skeletop --- app/src/pages/desktop/appearance.rs | 105 +++++++++++++++++++++++++--- i18n/en/cosmic_settings.ftl | 1 + 2 files changed, 98 insertions(+), 8 deletions(-) diff --git a/app/src/pages/desktop/appearance.rs b/app/src/pages/desktop/appearance.rs index 0d3bb6b1..8266aa7e 100644 --- a/app/src/pages/desktop/appearance.rs +++ b/app/src/pages/desktop/appearance.rs @@ -2,22 +2,52 @@ // SPDX-License-Identifier: GPL-3.0-only use apply::Apply; +use cosmic::iced::widget::{column, row}; use cosmic::iced_core::Length; -use cosmic::widget::{container, settings, text}; +use cosmic::widget::divider::horizontal; +use cosmic::widget::{button, container, horizontal_space, settings, spin_button, text}; use cosmic::Element; use cosmic_settings_page::Section; use cosmic_settings_page::{self as page, section}; use slotmap::SlotMap; +// TODO integrate with settings backend #[derive(Default)] -pub struct Page; +pub struct Page { + autoswitch: bool, + accent_window_hint: bool, + frosted: bool, + window_hint_size: u16, + gap_size: u16, + can_reset: bool, +} #[derive(Debug, Copy, Clone)] -pub enum Message {} +pub enum Message { + Autoswitch(bool), + AccentWindowHint(bool), + Frosted(bool), + WindowHintSize(spin_button::Message), + GapSize(spin_button::Message), +} impl Page { pub fn update(&mut self, message: Message) { - // TODO + match message { + Message::Autoswitch(enabled) => { + self.autoswitch = true; + } + Message::AccentWindowHint(enabled) => { + self.accent_window_hint = true; + } + Message::Frosted(enabled) => { + self.frosted = enabled; + } + Message::WindowHintSize(msg) => { + // self.window_hint_size = s; + } + Message::GapSize(msg) => {} + } } } @@ -30,6 +60,7 @@ impl page::Page for Page { sections.insert(mode_and_colors()), sections.insert(style()), sections.insert(window_management()), + sections.insert(reset_button()), ]) } @@ -45,18 +76,25 @@ pub fn mode_and_colors() -> Section { Section::default() .title(fl!("mode-and-colors")) .descriptions(vec![ + // 0 fl!("auto-switch"), fl!("auto-switch", "desc"), + //2 fl!("accent-color"), + //3 fl!("app-background"), + //4 fl!("container-background"), + fl!("container-background", "desc"), fl!("container-background", "desc-detail"), fl!("container-background", "reset"), - fl!("container-background", "desc"), + // 8 fl!("text-tint"), fl!("text-tint", "desc"), + // 10 fl!("control-tint"), fl!("control-tint", "desc"), + // 12 fl!("window-hint-accent"), ]) .view::(|_binder, page, section| { @@ -64,6 +102,32 @@ pub fn mode_and_colors() -> Section { settings::view_section(§ion.title) .add(container(text("TODO")).width(Length::Fill)) + .add( + settings::item::builder(&descriptions[0]) + .description(&descriptions[1]) + .toggler(page.autoswitch, Message::Autoswitch), + ) + .add(column![text(&descriptions[2]), container(text("TODO",))]) + .add(settings::item::builder(&descriptions[3]).control(container(text("TODO")))) + .add( + settings::item::builder(&descriptions[4]) + .description(&descriptions[5]) + .control(container(text("TODO"))), + ) + .add( + settings::item::builder(&descriptions[8]) + .description(&descriptions[9]) + .control(container(text("TODO"))), + ) + .add( + settings::item::builder(&descriptions[10]) + .description(&descriptions[11]) + .control(container(text("TODO"))), + ) + .add( + settings::item::builder(&descriptions[12]) + .toggler(page.accent_window_hint, Message::AccentWindowHint), + ) .apply(Element::from) .map(crate::pages::Message::Appearance) }) @@ -74,7 +138,6 @@ pub fn style() -> Section { Section::default() .title(fl!("style")) .descriptions(vec![ - fl!("style"), fl!("style", "round"), fl!("style", "slightly-round"), fl!("style", "square"), @@ -85,7 +148,12 @@ pub fn style() -> Section { let descriptions = §ion.descriptions; settings::view_section(§ion.title) - .add(container(text("TODO")).width(Length::Fill)) + .add(container(text("TODO Toggle Image buttons for roundness")).width(Length::Fill)) + .add( + settings::item::builder(&descriptions[3]) + .description(&descriptions[4]) + .toggler(page.frosted, Message::Frosted), + ) .apply(Element::from) .map(crate::pages::Message::Appearance) }) @@ -103,10 +171,31 @@ pub fn window_management() -> Section { let descriptions = §ion.descriptions; settings::view_section(§ion.title) - .add(container(text("TODO")).width(Length::Fill)) + .add( + settings::item::builder(&descriptions[0]) + .control(cosmic::widget::spin_button("", Message::WindowHintSize)), + ) + .add( + settings::item::builder(&descriptions[1]) + .control(cosmic::widget::spin_button("", Message::GapSize)), + ) .apply(Element::from) .map(crate::pages::Message::Appearance) }) } +#[allow(clippy::too_many_lines)] +pub fn reset_button() -> Section { + Section::default() + .descriptions(vec![fl!("reset-default")]) + .view::(|_binder, page, section| { + let descriptions = §ion.descriptions; + if page.can_reset { + row![button(text(&descriptions[0]))].apply(Element::from) + } else { + horizontal_space(1).apply(Element::from) + } + .map(crate::pages::Message::Appearance) + }) +} impl page::AutoBind for Page {} diff --git a/i18n/en/cosmic_settings.ftl b/i18n/en/cosmic_settings.ftl index 0bb7cd13..37f8d292 100644 --- a/i18n/en/cosmic_settings.ftl +++ b/i18n/en/cosmic_settings.ftl @@ -37,6 +37,7 @@ style = Style frosted = Frosted glass effect on system interface .desc = Applies background blur to panel, dock, applets, launcher, and application library. +reset-default = Reset to default # interface density left out for now window-management = Window Management From 13feeb6712c3f3fe32c07b88e9e9a47d6e7723c0 Mon Sep 17 00:00:00 2001 From: Ashley Wulber Date: Tue, 3 Oct 2023 19:06:00 -0400 Subject: [PATCH 04/27] wip: appearance --- Cargo.lock | 643 +++++++++++++----- Cargo.toml | 6 +- app/src/app.rs | 7 +- app/src/pages/desktop/appearance.rs | 509 +++++++++++++- app/src/pages/desktop/panel/applets_inner.rs | 2 +- i18n/en/cosmic_settings.ftl | 5 + justfile | 5 +- pages/desktop/Cargo.toml | 6 +- .../v1/accent | 1 + .../v1/bg_color | 1 + .../v1/corner_radii | 1 + .../v1/destructive | 1 + .../v1/neutral_tint | 1 + .../v1/palette | 1 + .../v1/primary_container_bg | 1 + .../v1/secondary_container_bg | 1 + .../v1/spacing | 1 + .../v1/success | 1 + .../v1/text_tint | 1 + .../v1/warning | 1 + .../com.system76.CosmicTheme.Dark/v1/accent | 1 + .../v1/background | 1 + .../v1/corner_radii | 1 + .../v1/destructive | 1 + .../com.system76.CosmicTheme.Dark/v1/is_dark | 1 + .../v1/is_high_contrast | 1 + .../com.system76.CosmicTheme.Dark/v1/name | 1 + .../com.system76.CosmicTheme.Dark/v1/palette | 1 + .../com.system76.CosmicTheme.Dark/v1/primary | 1 + .../v1/secondary | 1 + .../com.system76.CosmicTheme.Dark/v1/spacing | 1 + .../com.system76.CosmicTheme.Dark/v1/success | 1 + .../com.system76.CosmicTheme.Dark/v1/warning | 1 + .../v1/accent | 1 + .../v1/bg_color | 1 + .../v1/corner_radii | 1 + .../v1/destructive | 1 + .../v1/neutral_tint | 1 + .../v1/palette | 1 + .../v1/primary_container_bg | 1 + .../v1/secondary_container_bg | 1 + .../v1/spacing | 1 + .../v1/success | 1 + .../v1/text_tint | 1 + .../v1/warning | 1 + .../com.system76.CosmicTheme.Light/v1/accent | 1 + .../v1/background | 1 + .../v1/corner_radii | 1 + .../v1/destructive | 1 + .../com.system76.CosmicTheme.Light/v1/is_dark | 1 + .../v1/is_high_contrast | 1 + .../com.system76.CosmicTheme.Light/v1/name | 1 + .../com.system76.CosmicTheme.Light/v1/palette | 1 + .../com.system76.CosmicTheme.Light/v1/primary | 1 + .../v1/secondary | 1 + .../com.system76.CosmicTheme.Light/v1/spacing | 1 + .../com.system76.CosmicTheme.Light/v1/success | 1 + .../com.system76.CosmicTheme.Light/v1/warning | 1 + .../v1/auto_switch | 1 + .../com.system76.CosmicTheme.Mode/v1/is_dark | 1 + 60 files changed, 1021 insertions(+), 214 deletions(-) create mode 100644 resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v1/accent create mode 100644 resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v1/bg_color create mode 100644 resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v1/corner_radii create mode 100644 resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v1/destructive create mode 100644 resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v1/neutral_tint create mode 100644 resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v1/palette create mode 100644 resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v1/primary_container_bg create mode 100644 resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v1/secondary_container_bg create mode 100644 resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v1/spacing create mode 100644 resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v1/success create mode 100644 resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v1/text_tint create mode 100644 resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v1/warning create mode 100644 resources/default_schema/com.system76.CosmicTheme.Dark/v1/accent create mode 100644 resources/default_schema/com.system76.CosmicTheme.Dark/v1/background create mode 100644 resources/default_schema/com.system76.CosmicTheme.Dark/v1/corner_radii create mode 100644 resources/default_schema/com.system76.CosmicTheme.Dark/v1/destructive create mode 100644 resources/default_schema/com.system76.CosmicTheme.Dark/v1/is_dark create mode 100644 resources/default_schema/com.system76.CosmicTheme.Dark/v1/is_high_contrast create mode 100644 resources/default_schema/com.system76.CosmicTheme.Dark/v1/name create mode 100644 resources/default_schema/com.system76.CosmicTheme.Dark/v1/palette create mode 100644 resources/default_schema/com.system76.CosmicTheme.Dark/v1/primary create mode 100644 resources/default_schema/com.system76.CosmicTheme.Dark/v1/secondary create mode 100644 resources/default_schema/com.system76.CosmicTheme.Dark/v1/spacing create mode 100644 resources/default_schema/com.system76.CosmicTheme.Dark/v1/success create mode 100644 resources/default_schema/com.system76.CosmicTheme.Dark/v1/warning create mode 100644 resources/default_schema/com.system76.CosmicTheme.Light.Builder/v1/accent create mode 100644 resources/default_schema/com.system76.CosmicTheme.Light.Builder/v1/bg_color create mode 100644 resources/default_schema/com.system76.CosmicTheme.Light.Builder/v1/corner_radii create mode 100644 resources/default_schema/com.system76.CosmicTheme.Light.Builder/v1/destructive create mode 100644 resources/default_schema/com.system76.CosmicTheme.Light.Builder/v1/neutral_tint create mode 100644 resources/default_schema/com.system76.CosmicTheme.Light.Builder/v1/palette create mode 100644 resources/default_schema/com.system76.CosmicTheme.Light.Builder/v1/primary_container_bg create mode 100644 resources/default_schema/com.system76.CosmicTheme.Light.Builder/v1/secondary_container_bg create mode 100644 resources/default_schema/com.system76.CosmicTheme.Light.Builder/v1/spacing create mode 100644 resources/default_schema/com.system76.CosmicTheme.Light.Builder/v1/success create mode 100644 resources/default_schema/com.system76.CosmicTheme.Light.Builder/v1/text_tint create mode 100644 resources/default_schema/com.system76.CosmicTheme.Light.Builder/v1/warning create mode 100644 resources/default_schema/com.system76.CosmicTheme.Light/v1/accent create mode 100644 resources/default_schema/com.system76.CosmicTheme.Light/v1/background create mode 100644 resources/default_schema/com.system76.CosmicTheme.Light/v1/corner_radii create mode 100644 resources/default_schema/com.system76.CosmicTheme.Light/v1/destructive create mode 100644 resources/default_schema/com.system76.CosmicTheme.Light/v1/is_dark create mode 100644 resources/default_schema/com.system76.CosmicTheme.Light/v1/is_high_contrast create mode 100644 resources/default_schema/com.system76.CosmicTheme.Light/v1/name create mode 100644 resources/default_schema/com.system76.CosmicTheme.Light/v1/palette create mode 100644 resources/default_schema/com.system76.CosmicTheme.Light/v1/primary create mode 100644 resources/default_schema/com.system76.CosmicTheme.Light/v1/secondary create mode 100644 resources/default_schema/com.system76.CosmicTheme.Light/v1/spacing create mode 100644 resources/default_schema/com.system76.CosmicTheme.Light/v1/success create mode 100644 resources/default_schema/com.system76.CosmicTheme.Light/v1/warning create mode 100644 resources/default_schema/com.system76.CosmicTheme.Mode/v1/auto_switch create mode 100644 resources/default_schema/com.system76.CosmicTheme.Mode/v1/is_dark diff --git a/Cargo.lock b/Cargo.lock index e654c1cf..4f9e7212 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -172,7 +172,7 @@ dependencies = [ "serde_repr", "tokio", "url", - "wayland-backend", + "wayland-backend 0.1.2", "wayland-client 0.30.2", "wayland-protocols 0.30.1", "zbus", @@ -201,14 +201,14 @@ dependencies = [ [[package]] name = "async-executor" -version = "1.5.1" +version = "1.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fa3dc5f2a8564f07759c008b9109dc0d39de92a88d5588b8a5036d286383afb" +checksum = "2c1da3ae8dabd9c00f453a329dfe1fb28da3c0a72e2478cdcd93171740c20499" dependencies = [ "async-lock", "async-task", "concurrent-queue", - "fastrand 1.9.0", + "fastrand 2.0.1", "futures-lite", "slab", ] @@ -238,8 +238,8 @@ dependencies = [ "futures-lite", "log", "parking", - "polling", - "rustix 0.37.23", + "polling 2.8.0", + "rustix 0.37.24", "slab", "socket2 0.4.9", "waker-fn", @@ -267,7 +267,7 @@ dependencies = [ "cfg-if", "event-listener", "futures-lite", - "rustix 0.37.23", + "rustix 0.37.24", "signal-hook", "windows-sys 0.48.0", ] @@ -285,9 +285,9 @@ dependencies = [ [[package]] name = "async-task" -version = "4.4.0" +version = "4.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecc7ab41815b3c653ccd2978ec3255c81349336702dfdf62ee6f7069b12a3aae" +checksum = "b9441c6b2fe128a7c2bf680a44c34d0df31ce09e5b7e401fcca3faa483dbc921" [[package]] name = "async-trait" @@ -302,9 +302,9 @@ dependencies = [ [[package]] name = "atomic-waker" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1181e1e0d1fce796a03db1ae795d67167da795f9cf4a39c37589e85ef57f26d3" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "atomicwrites" @@ -312,7 +312,7 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1163d9d7c51de51a2b79d6df5e8888d11e9df17c752ce4a285fb6ca1580734e" dependencies = [ - "rustix 0.37.23", + "rustix 0.37.24", "tempfile", "windows-sys 0.48.0", ] @@ -424,17 +424,18 @@ dependencies = [ [[package]] name = "blocking" -version = "1.3.1" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77231a1c8f801696fc0123ec6150ce92cffb8e164a02afb9c8ddee0e9b65ad65" +checksum = "94c4ef1f913d78636d78d538eec1f18de81e481f44b1be0a81060090530846e1" dependencies = [ "async-channel", "async-lock", "async-task", - "atomic-waker", - "fastrand 1.9.0", + "fastrand 2.0.1", + "futures-io", "futures-lite", - "log", + "piper", + "tracing", ] [[package]] @@ -484,6 +485,16 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" +[[package]] +name = "calendrical_calculations" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8dfe3bc6a50b4667fafdb6d9cf26731c5418c457e317d8166c972014facf9a5d" +dependencies = [ + "core_maths", + "displaydoc", +] + [[package]] name = "calloop" version = "0.10.6" @@ -498,6 +509,32 @@ dependencies = [ "vec_map", ] +[[package]] +name = "calloop" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aadd183e815348c0649051b1c43418643208f8ed13c8a84da7215b4e1cf42714" +dependencies = [ + "bitflags 2.4.0", + "log", + "polling 3.2.0", + "rustix 0.38.15", + "slab", + "thiserror", +] + +[[package]] +name = "calloop-wayland-source" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f0ea9b9476c7fad82841a8dbb380e2eae480c21910feba80725b46931ed8f02" +dependencies = [ + "calloop 0.12.2", + "rustix 0.38.15", + "wayland-backend 0.3.2", + "wayland-client 0.31.1", +] + [[package]] name = "cc" version = "1.0.83" @@ -587,15 +624,14 @@ dependencies = [ [[package]] name = "cocoa-foundation" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "931d3837c286f56e3c58423ce4eba12d08db2374461a785c86f672b08b5650d6" +checksum = "8c6234cbb2e4c785b456c0644748b1ac416dd045799740356f8363dfe00c93f7" dependencies = [ "bitflags 1.3.2", "block", "core-foundation", "core-graphics-types", - "foreign-types 0.3.2", "libc", "objc", ] @@ -666,9 +702,9 @@ checksum = "c5b80dba65d26e0c4b692ad0312b837f1177e8175031af57fd1de4f3bc36b430" [[package]] name = "concurrent-queue" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62ec6771ecfa0762d24683ee5a32ad78487a3d3afdc0fb8cae19d2c5deb50b7c" +checksum = "f057a694a54f12365049b0958a1685bb52d567f5593b355fbf685838e873d400" dependencies = [ "crossbeam-utils", ] @@ -745,6 +781,15 @@ dependencies = [ "libc", ] +[[package]] +name = "core_maths" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3b02505ccb8c50b0aa21ace0fc08c3e53adebd4e58caa18a36152803c7709a3" +dependencies = [ + "libm", +] + [[package]] name = "cosmic-bg-config" version = "0.1.0" @@ -762,7 +807,7 @@ dependencies = [ [[package]] name = "cosmic-comp-config" version = "0.1.0" -source = "git+https://github.com/pop-os/cosmic-comp#63c073e3e5fc422ae812795b6e47e3557b3f1d84" +source = "git+https://github.com/pop-os/cosmic-comp#d051f41de6d2daf1f0c5fa3d70d16d8b1b13b64b" dependencies = [ "input", "serde", @@ -771,10 +816,9 @@ dependencies = [ [[package]] name = "cosmic-config" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#1a1614b3296f3298b41c258da5f40247cbeee329" dependencies = [ "atomicwrites", - "calloop", + "calloop 0.12.2", "cosmic-config-derive", "dirs 5.0.1", "iced_futures", @@ -786,7 +830,6 @@ dependencies = [ [[package]] name = "cosmic-config-derive" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#1a1614b3296f3298b41c258da5f40247cbeee329" dependencies = [ "quote", "syn 1.0.109", @@ -795,14 +838,14 @@ dependencies = [ [[package]] name = "cosmic-panel-config" version = "0.1.0" -source = "git+https://github.com/pop-os/cosmic-panel#e4bf33198f9da2d7a9bc165ac82ca10c790ee3b1" +source = "git+https://github.com/pop-os/cosmic-panel#df55f44f504c1cee9377cb331c1fb9d95ca83967" dependencies = [ "anyhow", "cosmic-config", "ron", "serde", "tracing", - "wayland-protocols-wlr", + "wayland-protocols-wlr 0.1.0", "xdg-shell-wrapper-config", ] @@ -859,7 +902,7 @@ dependencies = [ "smithay-client-toolkit 0.17.0", "tokio", "tracing", - "wayland-client 0.30.2", + "wayland-client 0.31.1", ] [[package]] @@ -920,7 +963,6 @@ dependencies = [ [[package]] name = "cosmic-theme" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#1a1614b3296f3298b41c258da5f40247cbeee329" dependencies = [ "almost", "cosmic-config", @@ -1031,6 +1073,12 @@ dependencies = [ "typenum", ] +[[package]] +name = "css-color" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d101c65424c856131a3cb818da2ddde03500dc3656972269cdf79f018ef77eb4" + [[package]] name = "csscolorparser" version = "0.6.2" @@ -1141,7 +1189,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" dependencies = [ "cfg-if", - "hashbrown 0.14.0", + "hashbrown 0.14.1", "lock_api", "once_cell", "parking_lot_core 0.9.8", @@ -1259,7 +1307,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "330c60081dcc4c72131f8eb70510f1ac07223e5d4163db481a04a0befcffa412" dependencies = [ - "libloading 0.8.0", + "libloading 0.8.1", ] [[package]] @@ -1347,9 +1395,9 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "136526188508e25c6fef639d7927dfb3e0e3084488bf202267829cf7fc23dbdd" +checksum = "add4f07d43996f76ef320709726a556a9d4f965d9410d8d0271132d2f8293480" dependencies = [ "errno-dragonfly", "libc", @@ -1454,9 +1502,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764" +checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" [[package]] name = "fdeflate" @@ -1507,6 +1555,15 @@ dependencies = [ "num-traits", ] +[[package]] +name = "float_next_after" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fc612c5837986b7104a87a0df74a5460931f1c5274be12f8d0f40aa2f30d632" +dependencies = [ + "num-traits", +] + [[package]] name = "fluent" version = "0.16.0" @@ -1669,9 +1726,9 @@ dependencies = [ [[package]] name = "freedesktop-icons" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00e61ac115df4632b592d36b71fda3c259f4c8061c70b7fa429bac145890e880" +checksum = "3f9d46a9ae065c46efb83854bb10315de6d333bb6f4526ebe320c004dab7857e" dependencies = [ "dirs 4.0.0", "once_cell", @@ -1900,9 +1957,9 @@ checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" [[package]] name = "glam" -version = "0.24.1" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42218cb640844e3872cc3c153dc975229e080a6c4733b34709ef445610550226" +checksum = "b5418c17512bdf42730f9032c74e1ae39afc408745ebb2acf72fbc4691c17945" [[package]] name = "glow" @@ -1962,24 +2019,30 @@ dependencies = [ [[package]] name = "gpu-descriptor" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b0c02e1ba0bdb14e965058ca34e09c020f8e507a760df1121728e0aef68d57a" +checksum = "cc11df1ace8e7e564511f53af41f3e42ddc95b56fd07b3f4445d2a6048bc682c" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.0", "gpu-descriptor-types", - "hashbrown 0.12.3", + "hashbrown 0.14.1", ] [[package]] name = "gpu-descriptor-types" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "363e3677e55ad168fef68cf9de3a4a310b53124c5e784c53a1d70e92d23f2126" +checksum = "6bf0b36e6f090b7e1d8a4b49c0cb81c1f8376f72198c65dd3ad9ff3556b8b78c" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.0", ] +[[package]] +name = "grid" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1df00eed8d1f0db937f6be10e46e8072b0671accb504cf0f959c5c52c679f5b9" + [[package]] name = "guillotiere" version = "0.6.2" @@ -2011,9 +2074,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.14.0" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" +checksum = "7dfda62a12f55daeae5015f81b0baea145391cb4520f86c248fc615d72640d12" dependencies = [ "ahash 0.8.3", "allocator-api2", @@ -2074,7 +2137,7 @@ dependencies = [ "serde", "serde_derive", "thiserror", - "toml 0.8.0", + "toml 0.8.1", "unic-langid", ] @@ -2137,7 +2200,6 @@ dependencies = [ [[package]] name = "iced" version = "0.10.0" -source = "git+https://github.com/pop-os/libcosmic#1a1614b3296f3298b41c258da5f40247cbeee329" dependencies = [ "iced_accessibility", "iced_core", @@ -2153,7 +2215,6 @@ dependencies = [ [[package]] name = "iced_accessibility" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#1a1614b3296f3298b41c258da5f40247cbeee329" dependencies = [ "accesskit", "accesskit_unix", @@ -2162,7 +2223,6 @@ dependencies = [ [[package]] name = "iced_core" version = "0.10.0" -source = "git+https://github.com/pop-os/libcosmic#1a1614b3296f3298b41c258da5f40247cbeee329" dependencies = [ "bitflags 1.3.2", "iced_accessibility", @@ -2177,7 +2237,6 @@ dependencies = [ [[package]] name = "iced_futures" version = "0.7.0" -source = "git+https://github.com/pop-os/libcosmic#1a1614b3296f3298b41c258da5f40247cbeee329" dependencies = [ "futures", "iced_core", @@ -2190,7 +2249,6 @@ dependencies = [ [[package]] name = "iced_graphics" version = "0.9.0" -source = "git+https://github.com/pop-os/libcosmic#1a1614b3296f3298b41c258da5f40247cbeee329" dependencies = [ "bitflags 1.3.2", "bytemuck", @@ -2200,6 +2258,7 @@ dependencies = [ "image", "kamadak-exif", "log", + "lyon_path", "raw-window-handle 0.5.2", "thiserror", ] @@ -2207,7 +2266,6 @@ dependencies = [ [[package]] name = "iced_renderer" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#1a1614b3296f3298b41c258da5f40247cbeee329" dependencies = [ "iced_graphics", "iced_tiny_skia", @@ -2220,7 +2278,6 @@ dependencies = [ [[package]] name = "iced_runtime" version = "0.1.1" -source = "git+https://github.com/pop-os/libcosmic#1a1614b3296f3298b41c258da5f40247cbeee329" dependencies = [ "iced_accessibility", "iced_core", @@ -2232,7 +2289,6 @@ dependencies = [ [[package]] name = "iced_sctk" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#1a1614b3296f3298b41c258da5f40247cbeee329" dependencies = [ "enum-repr", "float-cmp", @@ -2248,15 +2304,14 @@ dependencies = [ "smithay-clipboard", "thiserror", "tracing", - "wayland-backend", - "wayland-protocols 0.30.1", + "wayland-backend 0.3.2", + "wayland-protocols 0.31.0", "xkeysym", ] [[package]] name = "iced_style" version = "0.9.0" -source = "git+https://github.com/pop-os/libcosmic#1a1614b3296f3298b41c258da5f40247cbeee329" dependencies = [ "iced_core", "once_cell", @@ -2266,7 +2321,6 @@ dependencies = [ [[package]] name = "iced_tiny_skia" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#1a1614b3296f3298b41c258da5f40247cbeee329" dependencies = [ "bytemuck", "cosmic-text", @@ -2284,7 +2338,6 @@ dependencies = [ [[package]] name = "iced_wgpu" version = "0.11.1" -source = "git+https://github.com/pop-os/libcosmic#1a1614b3296f3298b41c258da5f40247cbeee329" dependencies = [ "bitflags 1.3.2", "bytemuck", @@ -2294,6 +2347,7 @@ dependencies = [ "guillotiere", "iced_graphics", "log", + "lyon", "once_cell", "raw-window-handle 0.5.2", "resvg", @@ -2305,7 +2359,6 @@ dependencies = [ [[package]] name = "iced_widget" version = "0.1.3" -source = "git+https://github.com/pop-os/libcosmic#1a1614b3296f3298b41c258da5f40247cbeee329" dependencies = [ "iced_renderer", "iced_runtime", @@ -2320,7 +2373,6 @@ dependencies = [ [[package]] name = "iced_winit" version = "0.10.0" -source = "git+https://github.com/pop-os/libcosmic#1a1614b3296f3298b41c258da5f40247cbeee329" dependencies = [ "iced_graphics", "iced_runtime", @@ -2336,40 +2388,71 @@ dependencies = [ [[package]] name = "icu_calendar" -version = "1.2.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dee1e8c25ed44743d03e2d58ca1c0226786dc1aac1f9cb27485e2da2de5e0918" +checksum = "ff0efcbeb549a74ade74c9e385e59568272dc840ec68b2eb772708de16b77c6b" dependencies = [ + "calendrical_calculations", "displaydoc", + "icu_calendar_data", "icu_locid", + "icu_locid_transform", "icu_provider", "tinystr", "writeable", "zerovec", ] +[[package]] +name = "icu_calendar_data" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf910a18bc3665153db121163ffe3fac18add670c778a4c485e50140ef198b61" + [[package]] name = "icu_locid" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3003f85dccfc0e238ff567693248c59153a46f4e6125ba4020b973cef4d1d335" +checksum = "56b72c6de0121c00da9828eb3e2603041d563788289bb15feba7c3331de71b5f" dependencies = [ "displaydoc", "litemap", "tinystr", "writeable", + "zerovec", +] + +[[package]] +name = "icu_locid_transform" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19b10b2a476daefcfe19707e095f5fdc1f446870a56e250250ae64782016bcf9" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_locid_transform_data", + "icu_provider", + "tinystr", + "zerovec", ] +[[package]] +name = "icu_locid_transform_data" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce5d8151979828a4645be945302e05c903cbb5c4a86a936965f7605bd5142e06" + [[package]] name = "icu_provider" -version = "1.2.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8dc312a7b6148f7dfe098047ae2494d12d4034f48ade58d4f353000db376e305" +checksum = "18d505243d809d5e14491a29ab9842f8a4b0568a33b462251f8ebf971ba55c83" dependencies = [ "displaydoc", "icu_locid", "icu_provider_macros", "stable_deref_trait", + "tinystr", "writeable", "yoke", "zerofrom", @@ -2378,29 +2461,37 @@ dependencies = [ [[package]] name = "icu_provider_macros" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b728b9421e93eff1d9f8681101b78fa745e0748c95c655c83f337044a7e10" +checksum = "ca9be8af0b117ccf1516251daab4c9137c012646a211c2a02d2f568ea3cd0df4" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.37", ] [[package]] name = "icu_timezone" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e22da75a450de2d54161838efa9e1a1f5baa7bc1fffdb015f260e0992b01977" +checksum = "d411c1ab1c6062291de1f347d46eca742dd945ee21e0f012e22f27b273b38659" dependencies = [ "displaydoc", "icu_calendar", "icu_locid", "icu_provider", + "icu_timezone_data", "tinystr", + "zerotrie", "zerovec", ] +[[package]] +name = "icu_timezone_data" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9628d42fbde50f50ec8ee704c7cba46279734b46f1f4c352b6d5c5d4a9165008" + [[package]] name = "ident_case" version = "1.0.1" @@ -2460,12 +2551,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.0.0" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +checksum = "8adf3ddd720272c6ea8bf59463c04e0f93d0bbf7c5439b691bca2987e0270897" dependencies = [ "equivalent", - "hashbrown 0.14.0", + "hashbrown 0.14.1", ] [[package]] @@ -2560,7 +2651,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ "hermit-abi", - "rustix 0.38.13", + "rustix 0.38.15", "windows-sys 0.48.0", ] @@ -2676,12 +2767,12 @@ checksum = "9cdc71e17332e86d2e1d38c1f99edcb6288ee11b815fb1a4b049eaa2114d369b" [[package]] name = "libcosmic" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#1a1614b3296f3298b41c258da5f40247cbeee329" dependencies = [ "apply", "ashpd", "cosmic-config", "cosmic-theme", + "css-color", "derive_setters", "fraction", "freedesktop-icons", @@ -2698,6 +2789,7 @@ dependencies = [ "palette", "slotmap", "smithay-client-toolkit 0.17.0", + "taffy", "thiserror", "tokio", "tracing", @@ -2717,9 +2809,9 @@ dependencies = [ [[package]] name = "libloading" -version = "0.8.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d580318f95776505201b28cf98eb1fa5e4be3b689633ba6a3e6cd880ff22d8cb" +checksum = "c571b676ddfc9a8c12f1f3d3085a7b163966a8fd8098a90640953ce5f6170161" dependencies = [ "cfg-if", "windows-sys 0.48.0", @@ -2749,15 +2841,15 @@ checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" [[package]] name = "linux-raw-sys" -version = "0.4.7" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a9bad9f94746442c783ca431b22403b519cd7fbeed0533fdd6328b2f2212128" +checksum = "3852614a3bd9ca9804678ba6be5e3b8ce76dfc902cae004e3e0c44051b6e88db" [[package]] name = "litemap" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a04a5b2b6f54acba899926491d0a6c59d98012938ca2ab5befb281c034e8f94" +checksum = "77a1a2647d5b7134127971a6de0d533c49de2159167e7f259c427195f87168a1" [[package]] name = "locale_config" @@ -2794,7 +2886,59 @@ version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4a83fb7698b3643a0e34f9ae6f2e8f0178c0fd42f8b59d493aa271ff3a5bf21" dependencies = [ - "hashbrown 0.14.0", + "hashbrown 0.14.1", +] + +[[package]] +name = "lyon" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e7f9cda98b5430809e63ca5197b06c7d191bf7e26dfc467d5a3f0290e2a74f" +dependencies = [ + "lyon_algorithms", + "lyon_tessellation", +] + +[[package]] +name = "lyon_algorithms" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00a0349cd8f0270781bb93a824b63df6178e3b4a27794e7be3ce3763f5a44d6e" +dependencies = [ + "lyon_path", + "num-traits", +] + +[[package]] +name = "lyon_geom" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74df1ff0a0147282eb10699537a03baa7d31972b58984a1d44ce0624043fe8ad" +dependencies = [ + "arrayvec 0.7.4", + "euclid", + "num-traits", +] + +[[package]] +name = "lyon_path" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca507745ba7ccbc76e5c44e7b63b1a29d2b0d6126f375806a5bbaf657c7d6c45" +dependencies = [ + "lyon_geom", + "num-traits", +] + +[[package]] +name = "lyon_tessellation" +version = "1.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d2124218d5428149f9e09520b9acc024334a607e671f032d06567b61008977c" +dependencies = [ + "float_next_after", + "lyon_path", + "thiserror", ] [[package]] @@ -2808,9 +2952,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.6.3" +version = "2.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f232d6ef707e1956a43342693d2a31e72989554d58299d7a88738cc95b0d35c" +checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" [[package]] name = "memmap2" @@ -3174,6 +3318,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" dependencies = [ "autocfg", + "libm", ] [[package]] @@ -3349,9 +3494,9 @@ dependencies = [ [[package]] name = "parking" -version = "2.1.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14f2252c834a40ed9bb5422029649578e63aa341ac401f74e719dd1afda8394e" +checksum = "e52c774a4c39359c1d1c52e43f73dd91a75a614652c825408eec30c95a9b2067" [[package]] name = "parking_lot" @@ -3487,6 +3632,17 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +[[package]] +name = "piper" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "668d31b1c4eba19242f2088b2bf3316b82ca31082a8335764db4e083db7485d4" +dependencies = [ + "atomic-waker", + "fastrand 2.0.1", + "futures-io", +] + [[package]] name = "pkg-config" version = "0.3.27" @@ -3522,6 +3678,20 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "polling" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62a79e457c9898100b4298d57d69ec53d06f9a6ed352431ce5f377e082d2e846" +dependencies = [ + "cfg-if", + "concurrent-queue", + "pin-project-lite", + "rustix 0.38.15", + "tracing", + "windows-sys 0.48.0", +] + [[package]] name = "ppv-lite86" version = "0.2.17" @@ -3595,6 +3765,15 @@ dependencies = [ "memchr", ] +[[package]] +name = "quick-xml" +version = "0.30.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eff6510e86862b57b210fd8cbe8ed3f0d7d600b9c2863cd4549a2e033c66e956" +dependencies = [ + "memchr", +] + [[package]] name = "quote" version = "1.0.33" @@ -3663,9 +3842,9 @@ checksum = "f2ff9a1f06a88b01621b7ae906ef0211290d1c8a168a15542486a8f61c0833b9" [[package]] name = "rayon" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b" +checksum = "9c27db03db7734835b3f53954b534c91069375ce6ccaa2e065441e07d9b6cdb1" dependencies = [ "either", "rayon-core", @@ -3673,14 +3852,12 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" +checksum = "5ce3fb6ad83f861aac485e76e1985cd109d9a3713802152be56c3b1f0e0658ed" dependencies = [ - "crossbeam-channel", "crossbeam-deque", "crossbeam-utils", - "num_cpus", ] [[package]] @@ -3720,9 +3897,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.9.5" +version = "1.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "697061221ea1b4a94a624f67d0ae2bfe4e22b8a17b6a192afb11046542cc8c47" +checksum = "ebee201405406dbf528b8b672104ae6d6d63e6d118cb10e4d51abbc7b58044ff" dependencies = [ "aho-corasick", "memchr", @@ -3732,9 +3909,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2f401f4955220693b56f8ec66ee9c78abffd8d1c4f23dc41a23839eb88f0795" +checksum = "59b23e92ee4318893fa3fe3e6fb365258efbfe6ac6ab30f090cdcbb7aa37efa9" dependencies = [ "aho-corasick", "memchr", @@ -3793,9 +3970,9 @@ dependencies = [ [[package]] name = "roxmltree" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8f595a457b6b8c6cda66a48503e92ee8d19342f905948f29c383200ec9eb1d8" +checksum = "862340e351ce1b271a378ec53f304a5558f7db87f3769dc655a8f6ecbb68b302" dependencies = [ "xmlparser", ] @@ -3858,9 +4035,9 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustix" -version = "0.37.23" +version = "0.37.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d69718bf81c6127a49dc64e44a742e8bb9213c0ff8869a22c308f84c1d4ab06" +checksum = "4279d76516df406a8bd37e7dff53fd37d1a093f997a3c34a5c21658c126db06d" dependencies = [ "bitflags 1.3.2", "errno", @@ -3872,14 +4049,14 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.13" +version = "0.38.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7db8590df6dfcd144d22afd1b83b36c21a18d7cbc1dc4bb5295a8712e9eb662" +checksum = "d2f9da0cbd88f9f09e7814e388301c8414c51c62aa6ce1e4b5c551d49d96e531" dependencies = [ "bitflags 2.4.0", "errno", "libc", - "linux-raw-sys 0.4.7", + "linux-raw-sys 0.4.8", "windows-sys 0.48.0", ] @@ -4033,9 +4210,9 @@ dependencies = [ [[package]] name = "sha1" -version = "0.10.5" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" dependencies = [ "cfg-if", "cpufeatures", @@ -4044,9 +4221,9 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.7" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ "cfg-if", "cpufeatures", @@ -4055,9 +4232,9 @@ dependencies = [ [[package]] name = "sharded-slab" -version = "0.1.4" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "900fba806f70c630b0a382d0d825e17a0f19fcd059a2ade1ff237bcddf446b31" +checksum = "c1b21f559e07218024e7e9f90f96f601825397de0e25420135f7f952453fed0b" dependencies = [ "lazy_static", ] @@ -4122,9 +4299,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.11.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" +checksum = "942b4a808e05215192e39f4ab80813e599068285906cc91aa64f923db842bd5a" [[package]] name = "smithay-client-toolkit" @@ -4133,7 +4310,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "870427e30b8f2cbe64bf43ec4b86e88fe39b0a84b3f15efd9c9c2d020bc86eb9" dependencies = [ "bitflags 1.3.2", - "calloop", + "calloop 0.10.6", "dlib", "lazy_static", "log", @@ -4148,11 +4325,12 @@ dependencies = [ [[package]] name = "smithay-client-toolkit" version = "0.17.0" -source = "git+https://github.com/smithay/client-toolkit//?rev=f49df45#f49df457aa0dd33d505c212bafab407257cb83f8" +source = "git+https://github.com/smithay/client-toolkit//?rev=dc8c4a0#dc8c4a035128208af65141fe12142a1dbc4a32bb" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.0", "bytemuck", - "calloop", + "calloop 0.12.2", + "calloop-wayland-source", "cursor-icon", "dlib", "log", @@ -4160,13 +4338,13 @@ dependencies = [ "nix 0.26.4", "pkg-config", "thiserror", - "wayland-backend", - "wayland-client 0.30.2", + "wayland-backend 0.3.2", + "wayland-client 0.31.1", "wayland-csd-frame", - "wayland-cursor 0.30.0", - "wayland-protocols 0.30.1", - "wayland-protocols-wlr", - "wayland-scanner 0.30.1", + "wayland-cursor 0.31.0", + "wayland-protocols 0.31.0", + "wayland-protocols-wlr 0.2.0", + "wayland-scanner 0.31.0", "xkbcommon", "xkeysym", ] @@ -4219,7 +4397,7 @@ dependencies = [ "redox_syscall 0.3.5", "thiserror", "wasm-bindgen", - "wayland-backend", + "wayland-backend 0.1.2", "wayland-client 0.30.2", "wayland-sys 0.30.1", "web-sys", @@ -4330,13 +4508,13 @@ dependencies = [ [[package]] name = "synstructure" -version = "0.12.6" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" +checksum = "285ba80e733fac80aa4270fbcdf83772a79b80aa35c97075320abfee4a915b06" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.37", "unicode-xid", ] @@ -4364,6 +4542,17 @@ dependencies = [ "winapi", ] +[[package]] +name = "taffy" +version = "0.3.11" +source = "git+https://github.com/DioxusLabs/taffy#120bb7a2e501822b324fd48de955450ebbba1c1a" +dependencies = [ + "arrayvec 0.7.4", + "grid", + "num-traits", + "slotmap", +] + [[package]] name = "temp-dir" version = "0.1.11" @@ -4377,9 +4566,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb94d2f3cc536af71caac6b6fcebf65860b347e7ce0cc9ebe8f70d3e521054ef" dependencies = [ "cfg-if", - "fastrand 2.0.0", + "fastrand 2.0.1", "redox_syscall 0.3.5", - "rustix 0.38.13", + "rustix 0.38.15", "windows-sys 0.48.0", ] @@ -4394,18 +4583,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.48" +version = "1.0.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d6d7a740b8a666a7e828dd00da9c0dc290dff53154ea77ac109281de90589b7" +checksum = "1177e8c6d7ede7afde3585fd2513e611227efd6481bd78d2e82ba1ce16557ed4" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.48" +version = "1.0.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49922ecae66cc8a249b77e68d1d0623c1b2c514f0060c27cdc68bd62a1219d35" +checksum = "10712f02019e9288794769fba95cd6847df9874d49d871d062172f9dd41bc4cc" dependencies = [ "proc-macro2", "quote", @@ -4495,9 +4684,9 @@ dependencies = [ [[package]] name = "tinystr" -version = "0.7.1" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ac3f5b6856e931e15e07b478e98c8045239829a65f9156d4fa7e7788197a5ef" +checksum = "b07bb54ef1f8ff27564b08b861144d3b8d40263efe07684f64987f4c0d044e3e" dependencies = [ "displaydoc", "zerovec", @@ -4547,14 +4736,14 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c226a7bba6d859b63c92c4b4fe69c5b6b72d0cb897dbc8e6012298e6154cb56e" +checksum = "1bc1433177506450fe920e46a4f9812d0c211f5dd556da10e731a0a3dfa151f0" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.20.0", + "toml_edit 0.20.1", ] [[package]] @@ -4572,18 +4761,18 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.0.0", + "indexmap 2.0.2", "toml_datetime", "winnow", ] [[package]] name = "toml_edit" -version = "0.20.0" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ff63e60a958cefbb518ae1fd6566af80d9d4be430a33f3723dfc47d1d411d95" +checksum = "ca676d9ba1a322c1b64eb8045a5ec5c0cfb0c9d08e15e9ff622589ad5221c8fe" dependencies = [ - "indexmap 2.0.0", + "indexmap 2.0.2", "serde", "serde_spanned", "toml_datetime", @@ -4910,9 +5099,9 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "waker-fn" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca" +checksum = "f3c4517f54858c779bbcbf228f4fca63d121bf85fbecb2dc578cdf4a39395690" [[package]] name = "walkdir" @@ -5026,6 +5215,20 @@ dependencies = [ "wayland-sys 0.30.1", ] +[[package]] +name = "wayland-backend" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19152ddd73f45f024ed4534d9ca2594e0ef252c1847695255dae47f34df9fbe4" +dependencies = [ + "cc", + "downcast-rs", + "nix 0.26.4", + "scoped-tls", + "smallvec", + "wayland-sys 0.31.1", +] + [[package]] name = "wayland-client" version = "0.29.5" @@ -5049,12 +5252,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "489c9654770f674fc7e266b3c579f4053d7551df0ceb392f153adb1f9ed06ac8" dependencies = [ "bitflags 1.3.2", - "calloop", "nix 0.26.4", - "wayland-backend", + "wayland-backend 0.1.2", "wayland-scanner 0.30.1", ] +[[package]] +name = "wayland-client" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ca7d52347346f5473bf2f56705f360e8440873052e575e55890c4fa57843ed3" +dependencies = [ + "bitflags 2.4.0", + "nix 0.26.4", + "wayland-backend 0.3.2", + "wayland-scanner 0.31.0", +] + [[package]] name = "wayland-commons" version = "0.29.5" @@ -5069,13 +5283,13 @@ dependencies = [ [[package]] name = "wayland-csd-frame" -version = "0.2.2" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7146581cd54ec2ef3a68e0d0e3501c9cefa8d4894da4007b715ecced5a289a1c" +checksum = "625c5029dbd43d25e6aa9615e88b829a5cad13b2819c4ae129fdbb7c31ab4c7e" dependencies = [ "bitflags 2.4.0", "cursor-icon", - "wayland-backend", + "wayland-backend 0.3.2", ] [[package]] @@ -5091,12 +5305,12 @@ dependencies = [ [[package]] name = "wayland-cursor" -version = "0.30.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d0c3a0d5b4b688b07b0442362d3ed6bf04724fcc16cd69ab6285b90dbc487aa" +checksum = "a44aa20ae986659d6c77d64d808a046996a932aa763913864dc40c359ef7ad5b" dependencies = [ "nix 0.26.4", - "wayland-client 0.30.2", + "wayland-client 0.31.1", "xcursor", ] @@ -5119,12 +5333,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3b28101e5ca94f70461a6c2d610f76d85ad223d042dd76585ab23d3422dd9b4d" dependencies = [ "bitflags 1.3.2", - "wayland-backend", + "wayland-backend 0.1.2", "wayland-client 0.30.2", "wayland-scanner 0.30.1", "wayland-server", ] +[[package]] +name = "wayland-protocols" +version = "0.31.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e253d7107ba913923dc253967f35e8561a3c65f914543e46843c88ddd729e21c" +dependencies = [ + "bitflags 2.4.0", + "wayland-backend 0.3.2", + "wayland-client 0.31.1", + "wayland-scanner 0.31.0", +] + [[package]] name = "wayland-protocols-wlr" version = "0.1.0" @@ -5132,13 +5358,26 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fce991093320e4a6a525876e6b629ab24da25f9baef0c2e0080ad173ec89588a" dependencies = [ "bitflags 1.3.2", - "wayland-backend", + "wayland-backend 0.1.2", "wayland-client 0.30.2", "wayland-protocols 0.30.1", "wayland-scanner 0.30.1", "wayland-server", ] +[[package]] +name = "wayland-protocols-wlr" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad1f61b76b6c2d8742e10f9ba5c3737f6530b4c243132c2a2ccc8aa96fe25cd6" +dependencies = [ + "bitflags 2.4.0", + "wayland-backend 0.3.2", + "wayland-client 0.31.1", + "wayland-protocols 0.31.0", + "wayland-scanner 0.31.0", +] + [[package]] name = "wayland-scanner" version = "0.29.5" @@ -5157,7 +5396,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9b873b257fbc32ec909c0eb80dea312076a67014e65e245f5eb69a6b8ab330e" dependencies = [ "proc-macro2", - "quick-xml", + "quick-xml 0.28.2", + "quote", +] + +[[package]] +name = "wayland-scanner" +version = "0.31.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb8e28403665c9f9513202b7e1ed71ec56fde5c107816843fb14057910b2c09c" +dependencies = [ + "proc-macro2", + "quick-xml 0.30.0", "quote", ] @@ -5171,7 +5421,7 @@ dependencies = [ "downcast-rs", "io-lifetimes", "nix 0.26.4", - "wayland-backend", + "wayland-backend 0.1.2", "wayland-scanner 0.30.1", ] @@ -5198,6 +5448,17 @@ dependencies = [ "pkg-config", ] +[[package]] +name = "wayland-sys" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15a0c8eaff5216d07f226cb7a549159267f3467b289d9a2e52fd3ef5aae2b7af" +dependencies = [ + "dlib", + "log", + "pkg-config", +] + [[package]] name = "web-sys" version = "0.3.64" @@ -5284,7 +5545,7 @@ dependencies = [ "js-sys", "khronos-egl", "libc", - "libloading 0.8.0", + "libloading 0.8.1", "log", "metal", "naga", @@ -5625,9 +5886,9 @@ dependencies = [ [[package]] name = "writeable" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60e49e42bdb1d5dc76f4cd78102f8f0714d32edfa3efb82286eb0f0b1fc0da0f" +checksum = "c0af0c3d13faebf8dda0b5256fa7096a2d5ccb662f7b9f54a40fe201077ab1c2" [[package]] name = "x11-dl" @@ -5708,7 +5969,7 @@ version = "0.1.0" source = "git+https://github.com/pop-os/xdg-shell-wrapper#652888ce7a591fb6b03b4d9f215e5bf0a1c8e629" dependencies = [ "serde", - "wayland-protocols-wlr", + "wayland-protocols-wlr 0.1.0", ] [[package]] @@ -5732,15 +5993,15 @@ dependencies = [ [[package]] name = "xml-rs" -version = "0.8.18" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bab77e97b50aee93da431f2cee7cd0f43b4d1da3c408042f2d7d164187774f0a" +checksum = "0fcb9cbac069e033553e8bb871be2fbdffcab578eb25bd0f7c508cedc6dcd75a" [[package]] name = "xmlparser" -version = "0.13.5" +version = "0.13.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d25c75bf9ea12c4040a97f829154768bbbce366287e2dc044af160cd79a13fd" +checksum = "66fee0b777b0f5ac1c69bb06d361268faafa61cd4682ae064a171c16c433e9e4" [[package]] name = "xmlwriter" @@ -5756,9 +6017,9 @@ checksum = "c94451ac9513335b5e23d7a8a2b61a7102398b8cca5160829d313e84c9d98be1" [[package]] name = "yoke" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1848075a23a28f9773498ee9a0f2cf58fcbad4f8c0ccf84a210ab33c6ae495de" +checksum = "61e38c508604d6bbbd292dadb3c02559aa7fff6b654a078a36217cad871636e4" dependencies = [ "serde", "stable_deref_trait", @@ -5768,13 +6029,13 @@ dependencies = [ [[package]] name = "yoke-derive" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af46c169923ed7516eef0aa32b56d2651b229f57458ebe46b49ddd6efef5b7a2" +checksum = "d5e19fb6ed40002bab5403ffa37e53e0e56f914a4450c8765f533018db1db35f" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.37", "synstructure", ] @@ -5847,36 +6108,47 @@ dependencies = [ [[package]] name = "zeno" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c110ba09c9b3a43edd4803d570df0da2414fed6e822e22b976a4e3ef50860701" +checksum = "dd15f8e0dbb966fd9245e7498c7e9e5055d9e5c8b676b95bd67091cd11a1e697" [[package]] name = "zerofrom" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df54d76c3251de27615dfcce21e636c172dafb2549cd7fd93e21c66f6ca6bea2" +checksum = "655b0814c5c0b19ade497851070c640773304939a6c0fd5f5fb43da0696d05b7" dependencies = [ "zerofrom-derive", ] [[package]] name = "zerofrom-derive" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4eae7c1f7d4b8eafce526bc0771449ddc2f250881ae31c50d22c032b5a1c499" +checksum = "e6a647510471d372f2e6c2e6b7219e44d8c574d24fdc11c610a61455782f18c3" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.37", "synstructure", ] +[[package]] +name = "zerotrie" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41354ddf8b8303c6e1274c5f2ed4bd7ad401db10634e50bd7303ae0fd84b2bd8" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", +] + [[package]] name = "zerovec" -version = "0.9.4" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "198f54134cd865f437820aa3b43d0ad518af4e68ee161b444cdd15d8e567c8ea" +checksum = "1194130c5b155bf8ae50ab16c86ab758cd695cf9ad176d2f870b744cbdbb572e" dependencies = [ "yoke", "zerofrom", @@ -5885,14 +6157,13 @@ dependencies = [ [[package]] name = "zerovec-derive" -version = "0.9.4" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "486558732d5dde10d0f8cb2936507c1bb21bc539d924c949baf5f36a58e51bac" +checksum = "acabf549809064225ff8878baedc4ce3732ac3b07e7c7ce6e5c2ccdbc485c324" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", - "synstructure", + "syn 2.0.37", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index cbf247ca..d80d9d7c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,13 +23,13 @@ git = "https://github.com/pop-os/cosmic-comp" git = "https://github.com/pop-os/cosmic-panel" [patch."https://github.com/pop-os/libcosmic"] -# libcosmic = { path = "../../libcosmic" } -# cosmic-config = { path = "../../libcosmic/cosmic-config" } +libcosmic = { path = "../libcosmic" } +cosmic-config = { path = "../libcosmic/cosmic-config" } # libcosmic = { git = "https://github.com/pop-os/libcosmic?rev=master", branch = "improv" } # cosmic-config = { git = "https://github.com/pop-os/libcosmic?rev=master", branch = "improv" } [patch."https://github.com/Smithay/client-toolkit"] -sctk = { git = "https://github.com/smithay/client-toolkit//", package = "smithay-client-toolkit", rev = "f49df45"} +sctk = { git = "https://github.com/smithay/client-toolkit//", package = "smithay-client-toolkit", rev = "dc8c4a0"} [profile.release] opt-level = 3 diff --git a/app/src/app.rs b/app/src/app.rs index 560c0c91..3d0b18ff 100644 --- a/app/src/app.rs +++ b/app/src/app.rs @@ -247,7 +247,7 @@ impl cosmic::Application for SettingsApp { } crate::pages::Message::Appearance(message) => { if let Some(page) = self.pages.page_mut::() { - page.update(message); + return page.update(message).map(cosmic::app::Message::App); } // TODO } @@ -347,6 +347,11 @@ impl cosmic::Application for SettingsApp { { return page.add_applet_view(crate::pages::Message::PanelApplet); } + if let Some(Some(page)) = (id == appearance::COLOR_PICKER_DIALOG_ID) + .then(|| self.pages.page::()) + { + return page.color_picker_view(); + } if let Some(Some(page)) = (id == ADD_DOCK_APPLET_DIALOGUE_ID).then(|| self.pages.page::()) { diff --git a/app/src/pages/desktop/appearance.rs b/app/src/pages/desktop/appearance.rs index 8266aa7e..80788c87 100644 --- a/app/src/pages/desktop/appearance.rs +++ b/app/src/pages/desktop/appearance.rs @@ -2,52 +2,464 @@ // SPDX-License-Identifier: GPL-3.0-only use apply::Apply; +use cosmic::cosmic_config::{Config, ConfigSet, CosmicConfigEntry}; +use cosmic::cosmic_theme::palette::Srgba; +use cosmic::cosmic_theme::{Theme, ThemeBuilder, ThemeMode}; +use cosmic::iced::wayland::actions::window::SctkWindowSettings; use cosmic::iced::widget::{column, row}; -use cosmic::iced_core::Length; -use cosmic::widget::divider::horizontal; -use cosmic::widget::{button, container, horizontal_space, settings, spin_button, text}; -use cosmic::Element; +use cosmic::iced::{window, Color}; +use cosmic::iced_core::{layout, Length}; +use cosmic::iced_sctk::commands::window::{close_window, get_window}; +use cosmic::widget::{ + button, container, header_bar, horizontal_space, settings, spin_button, text, ColorPickerModel, + ColorPickerUpdate, +}; +use cosmic::{Command, Element}; use cosmic_settings_page::Section; use cosmic_settings_page::{self as page, section}; use slotmap::SlotMap; +use tracing::warn; +use crate::app; +pub const COLOR_PICKER_DIALOG_ID: window::Id = window::Id(1003); + +enum NamedColorPicker { + CustomAccent, + ApplicationBackground, + ContainerBackground, + InterfaceText, + ControlComponent, +} // TODO integrate with settings backend -#[derive(Default)] pub struct Page { - autoswitch: bool, accent_window_hint: bool, frosted: bool, window_hint_size: u16, gap_size: u16, can_reset: bool, + custom_accent: ColorPickerModel, + application_background: ColorPickerModel, + container_background: ColorPickerModel, + interface_text: ColorPickerModel, + control_component: ColorPickerModel, + active_dialog: Option, + + theme_mode: ThemeMode, + theme_builder: ThemeBuilder, + + // Configs + theme_mode_config: Option, + theme_builder_config: Option, } -#[derive(Debug, Copy, Clone)] +impl Default for Page { + fn default() -> Self { + let theme_mode_config = ThemeMode::config().ok(); + let theme_mode = theme_mode_config + .as_ref() + .map(|c| match ThemeMode::get_entry(c) { + Ok(t) => t, + Err((errors, t)) => { + for e in errors { + tracing::error!("{e}"); + } + t + } + }) + .unwrap_or_default(); + + let theme_builder_config = if theme_mode.is_dark { + ThemeBuilder::dark_config() + } else { + ThemeBuilder::light_config() + } + .ok(); + let theme_builder = theme_mode_config + .as_ref() + .map(|c| match ThemeBuilder::get_entry(c) { + Ok(t) => t, + Err((errors, t)) => { + for e in errors { + tracing::error!("{e}"); + } + t + } + }) + .unwrap_or_default(); + Self { + accent_window_hint: Default::default(), + frosted: Default::default(), + window_hint_size: Default::default(), + gap_size: Default::default(), + can_reset: Default::default(), + custom_accent: ColorPickerModel::new(fl!("hex"), fl!("rgb"), None, None), + application_background: ColorPickerModel::new(fl!("hex"), fl!("rgb"), None, None), + container_background: ColorPickerModel::new(fl!("hex"), fl!("rgb"), None, None), + interface_text: ColorPickerModel::new(fl!("hex"), fl!("rgb"), None, None), + control_component: ColorPickerModel::new(fl!("hex"), fl!("rgb"), None, None), + active_dialog: None, + theme_mode_config, + theme_builder_config, + theme_mode, + theme_builder, + } + } +} + +#[derive(Debug, Clone)] pub enum Message { + DarkMode(bool), Autoswitch(bool), AccentWindowHint(bool), Frosted(bool), WindowHintSize(spin_button::Message), GapSize(spin_button::Message), + ApplicationBackground(ColorPickerUpdate), + ContainerBackground(ColorPickerUpdate), + CustomAccent(ColorPickerUpdate), + InterfaceText(ColorPickerUpdate), + ControlComponent(ColorPickerUpdate), + CloseRequested(window::Id), } impl Page { - pub fn update(&mut self, message: Message) { - match message { + #[allow(clippy::too_many_lines)] + pub fn update(&mut self, message: Message) -> Command { + let mut theme_builder_needs_update = false; + + let ret = match message { + Message::DarkMode(enabled) => { + self.theme_mode.is_dark = enabled; + if let Some(config) = self.theme_mode_config.as_ref() { + // only update dark mode if autoswitch is disabled + if !self.theme_mode.auto_switch { + _ = config.set::("is_dark", enabled); + } + } + let theme_builder_config = if enabled { + ThemeBuilder::dark_config() + } else { + ThemeBuilder::light_config() + } + .ok(); + if let Some(config) = theme_builder_config.as_ref() { + self.theme_builder = match ThemeBuilder::get_entry(config) { + Ok(tb) => tb, + Err((errors, tb)) => { + for e in errors { + tracing::error!("{e}"); + } + tb + } + }; + } else { + tracing::error!("Failed to load the theme builder config."); + } + Command::none() + } Message::Autoswitch(enabled) => { - self.autoswitch = true; + self.theme_mode.auto_switch = enabled; + if let Some(config) = self.theme_mode_config.as_ref() { + _ = config.set::("auto_switch", enabled); + } + if !enabled {} + Command::none() } Message::AccentWindowHint(enabled) => { - self.accent_window_hint = true; + // TODO write to cosmic comp config + self.accent_window_hint = enabled; + Command::none() } Message::Frosted(enabled) => { + // TODO add variable to the config self.frosted = enabled; + Command::none() } Message::WindowHintSize(msg) => { - // self.window_hint_size = s; + // TODO write to cosmic comp config + self.window_hint_size = match msg { + spin_button::Message::Increment => self.window_hint_size.saturating_add(1), + spin_button::Message::Decrement => self.window_hint_size.saturating_sub(1), + }; + Command::none() + } + Message::GapSize(msg) => { + self.gap_size = match msg { + spin_button::Message::Increment => self.gap_size.saturating_add(1), + spin_button::Message::Decrement => self.gap_size.saturating_sub(1), + }; + Command::none() + } + Message::ApplicationBackground(u) => { + let cmd = match &u { + ColorPickerUpdate::AppliedColor | ColorPickerUpdate::Reset => { + // close the color picker dialog + // apply changes + theme_builder_needs_update = true; + close_window::(COLOR_PICKER_DIALOG_ID) + } + // TODO apply changes + ColorPickerUpdate::ActionFinished => { + theme_builder_needs_update = true; + _ = self + .application_background + .update::(ColorPickerUpdate::AppliedColor); + Command::none() + } + ColorPickerUpdate::Cancel => { + // close the color picker dialog + close_window(COLOR_PICKER_DIALOG_ID) + } + ColorPickerUpdate::ToggleColorPicker => { + // create the color picker dialog + // set the active picker + self.active_dialog = Some(NamedColorPicker::ApplicationBackground); + get_window(color_picker_window_settings()) + } + _ => Command::none(), + }; + Command::batch(vec![ + cmd, + self.application_background.update::(u), + ]) + } + Message::ContainerBackground(u) => { + let cmd = match &u { + ColorPickerUpdate::AppliedColor | ColorPickerUpdate::Reset => { + // close the color picker dialog + // apply changes + theme_builder_needs_update = true; + close_window::(COLOR_PICKER_DIALOG_ID) + } + // TODO apply changes + ColorPickerUpdate::ActionFinished => { + theme_builder_needs_update = true; + _ = self + .container_background + .update::(ColorPickerUpdate::AppliedColor); + Command::none() + } + ColorPickerUpdate::Cancel => { + // close the color picker dialog + close_window(COLOR_PICKER_DIALOG_ID) + } + ColorPickerUpdate::ToggleColorPicker => { + // create the color picker dialog + // set the active picker + self.active_dialog = Some(NamedColorPicker::ApplicationBackground); + get_window(color_picker_window_settings()) + } + _ => Command::none(), + }; + Command::batch(vec![ + cmd, + self.container_background.update::(u), + ]) + } + Message::CustomAccent(u) => { + let cmd = match &u { + ColorPickerUpdate::AppliedColor | ColorPickerUpdate::Reset => { + // close the color picker dialog + // apply changes + theme_builder_needs_update = true; + close_window::(COLOR_PICKER_DIALOG_ID) + } + // TODO apply changes + ColorPickerUpdate::ActionFinished => { + theme_builder_needs_update = true; + _ = self + .custom_accent + .update::(ColorPickerUpdate::AppliedColor); + Command::none() + } + ColorPickerUpdate::Cancel => { + // close the color picker dialog + close_window(COLOR_PICKER_DIALOG_ID) + } + ColorPickerUpdate::ToggleColorPicker => { + // create the color picker dialog + // set the active picker + self.active_dialog = Some(NamedColorPicker::CustomAccent); + get_window(color_picker_window_settings()) + } + _ => Command::none(), + }; + Command::batch(vec![cmd, self.custom_accent.update::(u)]) + } + Message::InterfaceText(u) => { + let cmd = match &u { + ColorPickerUpdate::AppliedColor | ColorPickerUpdate::Reset => { + // close the color picker dialog + // apply changes + theme_builder_needs_update = true; + close_window::(COLOR_PICKER_DIALOG_ID) + } + // TODO apply changes + ColorPickerUpdate::ActionFinished => { + theme_builder_needs_update = true; + _ = self + .interface_text + .update::(ColorPickerUpdate::AppliedColor); + Command::none() + } + ColorPickerUpdate::Cancel => { + // close the color picker dialog + close_window(COLOR_PICKER_DIALOG_ID) + } + ColorPickerUpdate::ToggleColorPicker => { + // create the color picker dialog + // set the active picker + self.active_dialog = Some(NamedColorPicker::InterfaceText); + get_window(color_picker_window_settings()) + } + _ => Command::none(), + }; + Command::batch(vec![cmd, self.interface_text.update::(u)]) + } + Message::ControlComponent(u) => { + let cmd = match &u { + ColorPickerUpdate::AppliedColor | ColorPickerUpdate::Reset => { + // close the color picker dialog + // apply changes + theme_builder_needs_update = true; + close_window::(COLOR_PICKER_DIALOG_ID) + } + // TODO apply changes + ColorPickerUpdate::ActionFinished => { + theme_builder_needs_update = true; + _ = self + .control_component + .update::(ColorPickerUpdate::AppliedColor); + Command::none() + } + ColorPickerUpdate::Cancel => { + // close the color picker dialog + close_window(COLOR_PICKER_DIALOG_ID) + } + ColorPickerUpdate::ToggleColorPicker => { + // create the color picker dialog + // set the active picker + self.active_dialog = Some(NamedColorPicker::ControlComponent); + get_window(color_picker_window_settings()) + } + _ => Command::none(), + }; + Command::batch(vec![cmd, self.control_component.update::(u)]) + } + Message::CloseRequested(id) => { + match self.active_dialog.take() { + Some(NamedColorPicker::ApplicationBackground) => { + _ = self + .application_background + .update::(ColorPickerUpdate::Cancel); + } + Some(NamedColorPicker::ContainerBackground) => { + _ = self + .container_background + .update::(ColorPickerUpdate::Cancel); + } + Some(NamedColorPicker::ControlComponent) => { + _ = self + .control_component + .update::(ColorPickerUpdate::Cancel); + } + Some(NamedColorPicker::CustomAccent) => { + _ = self + .custom_accent + .update::(ColorPickerUpdate::Cancel); + } + Some(NamedColorPicker::InterfaceText) => { + _ = self + .interface_text + .update::(ColorPickerUpdate::AppliedColor); + } + None => { + theme_builder_needs_update = false; + warn!("Unknown appearance dialog closed."); + } + }; + Command::none() + } + }; + + if theme_builder_needs_update { + let Some(config) = self.theme_builder_config.as_ref() else { + return ret; + }; + let mut theme_builder = std::mem::take(&mut self.theme_builder); + if let Some(c) = self.application_background.get_applied_color() { + theme_builder = theme_builder.bg_color(c.into()); + } + if let Some(c) = self.container_background.get_applied_color() { + theme_builder = theme_builder.primary_container_bg(c.into()); + } + if let Some(c) = self.custom_accent.get_applied_color() { + theme_builder = theme_builder.accent(c.into()); + } + if let Some(c) = self.interface_text.get_applied_color() { + theme_builder = theme_builder.text_tint(c.into()); + } + if let Some(c) = self.control_component.get_applied_color() { + theme_builder = theme_builder.neutral_tint(c.into()); + } + + _ = theme_builder.write_entry(config); + + self.theme_builder = theme_builder; + + let config = if self.theme_mode.is_dark { + Theme::::dark_config() + } else { + Theme::::light_config() + }; + if let Ok(config) = config { + let new_theme = self.theme_builder.clone().build(); + _ = new_theme.write_entry(&config); + } else { + tracing::error!("Failed to get the theme config."); } - Message::GapSize(msg) => {} } + + // TODO if there were some changes, rebuild and apply to the config + return ret; + } + + pub fn color_picker_view(&self) -> Element { + let (picker, msg): (_, fn(ColorPickerUpdate) -> Message) = match self.active_dialog { + Some(NamedColorPicker::ApplicationBackground) => { + (&self.application_background, Message::ApplicationBackground) + } + Some(NamedColorPicker::ContainerBackground) => { + (&self.container_background, Message::ContainerBackground) + } + Some(NamedColorPicker::ControlComponent) => { + (&self.control_component, Message::ControlComponent) + } + Some(NamedColorPicker::CustomAccent) => (&self.custom_accent, Message::CustomAccent), + Some(NamedColorPicker::InterfaceText) => (&self.interface_text, Message::InterfaceText), + None => return text("OOPS!").into(), + }; + column![ + header_bar() + .title(fl!("color-picker")) + .on_close(msg(ColorPickerUpdate::AppliedColor)), + picker + .builder(msg) + .width(Length::Fixed(254.0)) + .height(Length::Fixed(174.0)) + .reset_label(fl!("reset-to-default")) + .build( + fl!("recent-colors"), + fl!("copy-to-clipboard"), + fl!("copied-to-clipboard"), + ) + ] + .width(Length::Fill) + .height(Length::Fill) + .align_items(cosmic::iced_core::Alignment::Center) + .apply(Element::from) + .map(crate::pages::Message::Appearance) + .map(crate::app::Message::PageMessage) } } @@ -105,24 +517,64 @@ pub fn mode_and_colors() -> Section { .add( settings::item::builder(&descriptions[0]) .description(&descriptions[1]) - .toggler(page.autoswitch, Message::Autoswitch), + .toggler(page.theme_mode.auto_switch, Message::Autoswitch), + ) + .add(column![ + text(&descriptions[2]), + // if page.container_background.get_is_active() { + // container( + // page. + // .builder(Message::ContainerBackground) + // .build( + // fl!("recent-colors"), + // fl!("copy-to-clipboard"), + // fl!("copied-to-clipboard"), + // ), + // ) + // } else { + // container( + // page.bg_color_model + // .picker_button(Message::ContainerBackground), + // ) + // } + ]) + .add( + settings::item::builder(&descriptions[3]).control( + page.application_background + .picker_button(Message::ApplicationBackground) + .width(Length::Fixed(48.0)) + .height(Length::Fixed(24.0)), + ), ) - .add(column![text(&descriptions[2]), container(text("TODO",))]) - .add(settings::item::builder(&descriptions[3]).control(container(text("TODO")))) .add( settings::item::builder(&descriptions[4]) .description(&descriptions[5]) - .control(container(text("TODO"))), + .control( + page.container_background + .picker_button(Message::ContainerBackground) + .width(Length::Fixed(48.0)) + .height(Length::Fixed(24.0)), + ), ) .add( settings::item::builder(&descriptions[8]) .description(&descriptions[9]) - .control(container(text("TODO"))), + .control( + page.interface_text + .picker_button(Message::InterfaceText) + .width(Length::Fixed(48.0)) + .height(Length::Fixed(24.0)), + ), ) .add( settings::item::builder(&descriptions[10]) .description(&descriptions[11]) - .control(container(text("TODO"))), + .control( + page.control_component + .picker_button(Message::ControlComponent) + .width(Length::Fixed(48.0)) + .height(Length::Fixed(24.0)), + ), ) .add( settings::item::builder(&descriptions[12]) @@ -199,3 +651,22 @@ pub fn reset_button() -> Section { }) } impl page::AutoBind for Page {} + +fn color_picker_window_settings() -> SctkWindowSettings { + SctkWindowSettings { + window_id: COLOR_PICKER_DIALOG_ID, + app_id: Some("com.system76.CosmicSettings".to_string()), + title: Some(fl!("color-picker")), + parent: Some(window::Id(0)), + autosize: false, + size_limits: layout::Limits::NONE + .min_width(300.0) + .max_width(800.0) + .min_height(200.0) + .max_height(1080.0), + size: (286, 424), + resizable: None, + client_decorations: true, + transparent: true, + } +} diff --git a/app/src/pages/desktop/panel/applets_inner.rs b/app/src/pages/desktop/panel/applets_inner.rs index ce014fad..18917176 100644 --- a/app/src/pages/desktop/panel/applets_inner.rs +++ b/app/src/pages/desktop/panel/applets_inner.rs @@ -312,7 +312,7 @@ impl Page { scrollable( column::with_children(vec![ text(fl!("add-applet")).size(24).width(Length::Fill).into(), - text_input::search_input(&fl!("search-applets"), &self.search, None) + text_input::search_input(&fl!("search-applets"), &self.search) .on_input(move |s| { app::Message::PageMessage(msg_map(Message::Search(s))) }) diff --git a/i18n/en/cosmic_settings.ftl b/i18n/en/cosmic_settings.ftl index 37f8d292..b032890d 100644 --- a/i18n/en/cosmic_settings.ftl +++ b/i18n/en/cosmic_settings.ftl @@ -27,8 +27,13 @@ text-tint = Interface text tint control-tint = Control component tint .desc = Used for backgrounds of standard buttons, search inputs, text inputs, and similar components. window-hint-accent = Use theme accent color as active window hint +color-picker = Color Picker hex = Hex rgb = RGB +recent-colors = Recent colors +reset-to-default = Reset to default +copy-to-clipboard = Copy to clipboard +copied-to-clipboard = Copied to clipboard style = Style .round = Round diff --git a/justfile b/justfile index aa93c81a..5eed17a2 100644 --- a/justfile +++ b/justfile @@ -20,6 +20,8 @@ export RUSTFLAGS := if target-cpu != '' { rootdir := '' prefix := '/usr' +default-schema-target := clean(rootdir / prefix) / 'share' / 'cosmic' + # File paths bin-src := 'target' / 'release' / name bin-dest := clean(rootdir / prefix) / 'bin' / name @@ -69,7 +71,8 @@ install-file src dest: (install-cmd '-Dm0644' src dest) # Install everything install: (install-bin bin-src bin-dest) (install-file desktop-src desktop-dest) - +find resources/default_schema -type f -exec install -Dm0644 {} {{default-schema-target}}/{} \; + # Run the application for testing purposes run *args: env RUST_LOG=debug RUST_BACKTRACE=full cargo run --release {{args}} diff --git a/pages/desktop/Cargo.toml b/pages/desktop/Cargo.toml index 8fdd3bb9..51afc233 100644 --- a/pages/desktop/Cargo.toml +++ b/pages/desktop/Cargo.toml @@ -9,11 +9,11 @@ edition = "2021" cosmic-bg-config = { workspace = true } cosmic-config = { workspace = true } dirs = "5.0.1" -freedesktop-icons = "0.2.3" +freedesktop-icons = "0.2.4" futures-lite = "1.13.0" image = "0.24.6" rayon = "1.7.0" -sctk = { git = "https://github.com/smithay/client-toolkit/", package = "smithay-client-toolkit", rev = "f49df45"} +sctk = { git = "https://github.com/smithay/client-toolkit/", package = "smithay-client-toolkit", rev = "dc8c4a0"} tokio = { version = "1.28.0", features = ["sync"] } tracing = "0.1.37" -wayland-client = "0.30.1" +wayland-client = "0.31.1" diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v1/accent b/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v1/accent new file mode 100644 index 00000000..4af18322 --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v1/accent @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v1/bg_color b/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v1/bg_color new file mode 100644 index 00000000..4af18322 --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v1/bg_color @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v1/corner_radii b/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v1/corner_radii new file mode 100644 index 00000000..080fc7fe --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v1/corner_radii @@ -0,0 +1 @@ +(radius_0:(0.0,0.0,0.0,0.0),radius_xs:(4.0,4.0,4.0,4.0),radius_s:(8.0,8.0,8.0,8.0),radius_m:(16.0,16.0,16.0,16.0),radius_l:(32.0,32.0,32.0,32.0),radius_xl:(160.0,160.0,160.0,160.0)) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v1/destructive b/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v1/destructive new file mode 100644 index 00000000..4af18322 --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v1/destructive @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v1/neutral_tint b/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v1/neutral_tint new file mode 100644 index 00000000..4af18322 --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v1/neutral_tint @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v1/palette b/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v1/palette new file mode 100644 index 00000000..066764a0 --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v1/palette @@ -0,0 +1 @@ +Dark((name:"cosmic-dark",blue:(red:0.5803922,green:0.92156863,blue:0.92156863,alpha:1.0),red:(red:1.0,green:0.70980394,blue:0.70980394,alpha:1.0),green:(red:0.6745098,green:0.96862745,blue:0.8235294,alpha:1.0),yellow:(red:1.0,green:0.94509804,blue:0.61960787,alpha:1.0),gray_1:(red:0.105882354,green:0.105882354,blue:0.105882354,alpha:1.0),gray_2:(red:0.14901961,green:0.14901961,blue:0.14901961,alpha:1.0),gray_3:(red:0.1882353,green:0.1882353,blue:0.1882353,alpha:1.0),neutral_0:(red:0.0,green:0.0,blue:0.0,alpha:1.0),neutral_1:(red:0.105882354,green:0.105882354,blue:0.105882354,alpha:1.0),neutral_2:(red:0.1882353,green:0.1882353,blue:0.1882353,alpha:1.0),neutral_3:(red:0.2784314,green:0.2784314,blue:0.2784314,alpha:1.0),neutral_4:(red:0.36862746,green:0.36862746,blue:0.36862746,alpha:1.0),neutral_5:(red:0.46666667,green:0.46666667,blue:0.46666667,alpha:1.0),neutral_6:(red:0.5686275,green:0.5686275,blue:0.5686275,alpha:1.0),neutral_7:(red:0.67058825,green:0.67058825,blue:0.67058825,alpha:1.0),neutral_8:(red:0.7764706,green:0.7764706,blue:0.7764706,alpha:1.0),neutral_9:(red:0.8862745,green:0.8862745,blue:0.8862745,alpha:1.0),neutral_10:(red:1.0,green:1.0,blue:1.0,alpha:1.0),ext_warm_grey:(red:0.60784316,green:0.5568628,blue:0.5411765,alpha:1.0),ext_orange:(red:1.0,green:0.6784314,blue:0.0,alpha:1.0),ext_yellow:(red:0.99607843,green:0.85882354,blue:0.2509804,alpha:1.0),ext_blue:(red:0.28235295,green:0.7254902,blue:0.78039217,alpha:1.0),ext_purple:(red:0.8117647,green:0.49019608,blue:1.0,alpha:1.0),ext_pink:(red:0.9764706,green:0.22745098,blue:0.5137255,alpha:1.0),ext_indigo:(red:0.24313726,green:0.53333336,blue:1.0,alpha:1.0),accent_warm_grey:(red:0.33333334,green:0.2784314,blue:0.25882354,alpha:1.0),accent_orange:(red:0.6862745,green:0.36078432,blue:0.007843138,alpha:1.0),accent_yellow:(red:0.5882353,green:0.40784314,blue:0.0,alpha:1.0),accent_purple:(red:0.5058824,green:0.24705882,blue:1.0,alpha:1.0),accent_pink:(red:0.9764706,green:0.22745098,blue:0.5137255,alpha:1.0),accent_indigo:(red:0.24313726,green:0.53333336,blue:1.0,alpha:1.0))) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v1/primary_container_bg b/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v1/primary_container_bg new file mode 100644 index 00000000..4af18322 --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v1/primary_container_bg @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v1/secondary_container_bg b/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v1/secondary_container_bg new file mode 100644 index 00000000..4af18322 --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v1/secondary_container_bg @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v1/spacing b/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v1/spacing new file mode 100644 index 00000000..f08ea037 --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v1/spacing @@ -0,0 +1 @@ +(space_none:0,space_xxxs:4,space_xxs:8,space_xs:12,space_s:16,space_m:24,space_l:32,space_xl:48,space_xxl:64,space_xxxl:128) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v1/success b/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v1/success new file mode 100644 index 00000000..4af18322 --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v1/success @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v1/text_tint b/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v1/text_tint new file mode 100644 index 00000000..4af18322 --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v1/text_tint @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v1/warning b/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v1/warning new file mode 100644 index 00000000..4af18322 --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v1/warning @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark/v1/accent b/resources/default_schema/com.system76.CosmicTheme.Dark/v1/accent new file mode 100644 index 00000000..bab2f88a --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Dark/v1/accent @@ -0,0 +1 @@ +(base:(red:0.5803922,green:0.92156863,blue:0.92156863,alpha:1.0),hover:(red:0.38039216,green:0.5509804,blue:0.5509804,alpha:1.0),pressed:(red:0.33333334,green:0.50392157,blue:0.50392157,alpha:1.0),selected:(red:0.38039216,green:0.5509804,blue:0.5509804,alpha:1.0),selected_text:(red:0.5803922,green:0.92156863,blue:0.92156863,alpha:1.0),focus:(red:0.5803922,green:0.92156863,blue:0.92156863,alpha:1.0),divider:(red:0.0,green:0.0,blue:0.0,alpha:1.0),on:(red:0.0,green:0.0,blue:0.0,alpha:1.0),disabled:(red:0.5803922,green:0.92156863,blue:0.92156863,alpha:1.0),on_disabled:(red:0.2901961,green:0.46078432,blue:0.46078432,alpha:1.0),border:(red:0.5803922,green:0.92156863,blue:0.92156863,alpha:1.0),disabled_border:(red:0.5803922,green:0.92156863,blue:0.92156863,alpha:0.5)) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark/v1/background b/resources/default_schema/com.system76.CosmicTheme.Dark/v1/background new file mode 100644 index 00000000..743b8e19 --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Dark/v1/background @@ -0,0 +1 @@ +(base:(red:0.105882354,green:0.105882354,blue:0.105882354,alpha:1.0),component:(base:(red:0.18219745,green:0.18219745,blue:0.18219745,alpha:1.0),hover:(red:0.1639777,green:0.1639777,blue:0.1639777,alpha:1.0),pressed:(red:0.14575796,green:0.14575796,blue:0.14575796,alpha:1.0),selected:(red:0.1639777,green:0.1639777,blue:0.1639777,alpha:1.0),selected_text:(red:0.5803922,green:0.92156863,blue:0.92156863,alpha:1.0),focus:(red:0.5803922,green:0.92156863,blue:0.92156863,alpha:1.0),divider:(red:0.7532969,green:0.7532969,blue:0.75329685,alpha:0.2),on:(red:0.7532969,green:0.7532969,blue:0.75329685,alpha:1.0),disabled:(red:0.18219745,green:0.18219745,blue:0.18219745,alpha:1.0),on_disabled:(red:0.46774718,green:0.46774718,blue:0.46774715,alpha:1.0),border:(red:0.7764706,green:0.7764706,blue:0.7764706,alpha:1.0),disabled_border:(red:0.7764706,green:0.7764706,blue:0.7764706,alpha:0.5)),divider:(red:0.2662247,green:0.2662247,blue:0.2662247,alpha:1.0),on:(red:0.90759414,green:0.9075942,blue:0.90759414,alpha:1.0)) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark/v1/corner_radii b/resources/default_schema/com.system76.CosmicTheme.Dark/v1/corner_radii new file mode 100644 index 00000000..080fc7fe --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Dark/v1/corner_radii @@ -0,0 +1 @@ +(radius_0:(0.0,0.0,0.0,0.0),radius_xs:(4.0,4.0,4.0,4.0),radius_s:(8.0,8.0,8.0,8.0),radius_m:(16.0,16.0,16.0,16.0),radius_l:(32.0,32.0,32.0,32.0),radius_xl:(160.0,160.0,160.0,160.0)) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark/v1/destructive b/resources/default_schema/com.system76.CosmicTheme.Dark/v1/destructive new file mode 100644 index 00000000..1497110d --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Dark/v1/destructive @@ -0,0 +1 @@ +(base:(red:1.0,green:0.70980394,blue:0.70980394,alpha:1.0),hover:(red:0.5901961,green:0.44509804,blue:0.44509804,alpha:1.0),pressed:(red:0.54313725,green:0.39803922,blue:0.39803922,alpha:1.0),selected:(red:0.5901961,green:0.44509804,blue:0.44509804,alpha:1.0),selected_text:(red:0.5803922,green:0.92156863,blue:0.92156863,alpha:1.0),focus:(red:0.5803922,green:0.92156863,blue:0.92156863,alpha:1.0),divider:(red:0.0,green:0.0,blue:0.0,alpha:1.0),on:(red:0.0,green:0.0,blue:0.0,alpha:1.0),disabled:(red:1.0,green:0.70980394,blue:0.70980394,alpha:1.0),on_disabled:(red:0.5,green:0.35490197,blue:0.35490197,alpha:1.0),border:(red:1.0,green:0.70980394,blue:0.70980394,alpha:1.0),disabled_border:(red:1.0,green:0.70980394,blue:0.70980394,alpha:0.5)) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark/v1/is_dark b/resources/default_schema/com.system76.CosmicTheme.Dark/v1/is_dark new file mode 100644 index 00000000..f32a5804 --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Dark/v1/is_dark @@ -0,0 +1 @@ +true \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark/v1/is_high_contrast b/resources/default_schema/com.system76.CosmicTheme.Dark/v1/is_high_contrast new file mode 100644 index 00000000..02e4a84d --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Dark/v1/is_high_contrast @@ -0,0 +1 @@ +false \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark/v1/name b/resources/default_schema/com.system76.CosmicTheme.Dark/v1/name new file mode 100644 index 00000000..7147ddb3 --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Dark/v1/name @@ -0,0 +1 @@ +"cosmic-dark" \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark/v1/palette b/resources/default_schema/com.system76.CosmicTheme.Dark/v1/palette new file mode 100644 index 00000000..f48e53e5 --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Dark/v1/palette @@ -0,0 +1 @@ +(name:"cosmic-dark",blue:(red:0.5803922,green:0.92156863,blue:0.92156863,alpha:1.0),red:(red:1.0,green:0.70980394,blue:0.70980394,alpha:1.0),green:(red:0.6745098,green:0.96862745,blue:0.8235294,alpha:1.0),yellow:(red:1.0,green:0.94509804,blue:0.61960787,alpha:1.0),gray_1:(red:0.105882354,green:0.105882354,blue:0.105882354,alpha:1.0),gray_2:(red:0.14901961,green:0.14901961,blue:0.14901961,alpha:1.0),gray_3:(red:0.1882353,green:0.1882353,blue:0.1882353,alpha:1.0),neutral_0:(red:0.0,green:0.0,blue:0.0,alpha:1.0),neutral_1:(red:0.105882354,green:0.105882354,blue:0.105882354,alpha:1.0),neutral_2:(red:0.1882353,green:0.1882353,blue:0.1882353,alpha:1.0),neutral_3:(red:0.2784314,green:0.2784314,blue:0.2784314,alpha:1.0),neutral_4:(red:0.36862746,green:0.36862746,blue:0.36862746,alpha:1.0),neutral_5:(red:0.46666667,green:0.46666667,blue:0.46666667,alpha:1.0),neutral_6:(red:0.5686275,green:0.5686275,blue:0.5686275,alpha:1.0),neutral_7:(red:0.67058825,green:0.67058825,blue:0.67058825,alpha:1.0),neutral_8:(red:0.7764706,green:0.7764706,blue:0.7764706,alpha:1.0),neutral_9:(red:0.8862745,green:0.8862745,blue:0.8862745,alpha:1.0),neutral_10:(red:1.0,green:1.0,blue:1.0,alpha:1.0),ext_warm_grey:(red:0.60784316,green:0.5568628,blue:0.5411765,alpha:1.0),ext_orange:(red:1.0,green:0.6784314,blue:0.0,alpha:1.0),ext_yellow:(red:0.99607843,green:0.85882354,blue:0.2509804,alpha:1.0),ext_blue:(red:0.28235295,green:0.7254902,blue:0.78039217,alpha:1.0),ext_purple:(red:0.8117647,green:0.49019608,blue:1.0,alpha:1.0),ext_pink:(red:0.9764706,green:0.22745098,blue:0.5137255,alpha:1.0),ext_indigo:(red:0.24313726,green:0.53333336,blue:1.0,alpha:1.0),accent_warm_grey:(red:0.33333334,green:0.2784314,blue:0.25882354,alpha:1.0),accent_orange:(red:0.6862745,green:0.36078432,blue:0.007843138,alpha:1.0),accent_yellow:(red:0.5882353,green:0.40784314,blue:0.0,alpha:1.0),accent_purple:(red:0.5058824,green:0.24705882,blue:1.0,alpha:1.0),accent_pink:(red:0.9764706,green:0.22745098,blue:0.5137255,alpha:1.0),accent_indigo:(red:0.24313726,green:0.53333336,blue:1.0,alpha:1.0)) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark/v1/primary b/resources/default_schema/com.system76.CosmicTheme.Dark/v1/primary new file mode 100644 index 00000000..89f84809 --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Dark/v1/primary @@ -0,0 +1 @@ +(base:(red:0.15292811,green:0.15292811,blue:0.15292808,alpha:1.0),component:(base:(red:0.21220893,green:0.2122089,blue:0.2122089,alpha:1.0),hover:(red:0.19098803,green:0.190988,blue:0.190988,alpha:1.0),pressed:(red:0.16976714,green:0.16976713,blue:0.16976713,alpha:1.0),selected:(red:0.19098803,green:0.190988,blue:0.190988,alpha:1.0),selected_text:(red:0.5803922,green:0.92156863,blue:0.92156863,alpha:1.0),focus:(red:0.5803922,green:0.92156863,blue:0.92156863,alpha:1.0),divider:(red:0.7913618,green:0.7913618,blue:0.7913618,alpha:0.2),on:(red:0.7913618,green:0.7913618,blue:0.7913618,alpha:1.0),disabled:(red:0.21220893,green:0.2122089,blue:0.2122089,alpha:1.0),on_disabled:(red:0.5017854,green:0.50178534,blue:0.50178534,alpha:1.0),border:(red:0.7764706,green:0.7764706,blue:0.7764706,alpha:1.0),disabled_border:(red:0.7764706,green:0.7764706,blue:0.7764706,alpha:0.5)),divider:(red:0.31702772,green:0.31702772,blue:0.3170277,alpha:1.0),on:(red:0.97342616,green:0.97342616,blue:0.97342604,alpha:1.0)) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark/v1/secondary b/resources/default_schema/com.system76.CosmicTheme.Dark/v1/secondary new file mode 100644 index 00000000..d99669f9 --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Dark/v1/secondary @@ -0,0 +1 @@ +(base:(red:0.20212594,green:0.20212597,blue:0.20212597,alpha:1.0),component:(base:(red:0.23260304,green:0.23260307,blue:0.23260304,alpha:1.0),hover:(red:0.20934273,green:0.20934276,blue:0.20934273,alpha:1.0),pressed:(red:0.18608244,green:0.18608247,blue:0.18608244,alpha:1.0),selected:(red:0.20934273,green:0.20934276,blue:0.20934273,alpha:1.0),selected_text:(red:0.5803922,green:0.92156863,blue:0.92156863,alpha:1.0),focus:(red:0.5803922,green:0.92156863,blue:0.92156863,alpha:1.0),divider:(red:0.81693083,green:0.8169309,blue:0.8169309,alpha:0.2),on:(red:0.81693083,green:0.8169309,blue:0.8169309,alpha:1.0),disabled:(red:0.23260304,green:0.23260307,blue:0.23260304,alpha:1.0),on_disabled:(red:0.5247669,green:0.524767,blue:0.524767,alpha:1.0),border:(red:0.7764706,green:0.7764706,blue:0.7764706,alpha:1.0),disabled_border:(red:0.7764706,green:0.7764706,blue:0.7764706,alpha:0.5)),divider:(red:0.3174277,green:0.31742772,blue:0.3174277,alpha:1.0),on:(red:0.7786347,green:0.7786347,blue:0.77863467,alpha:1.0)) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark/v1/spacing b/resources/default_schema/com.system76.CosmicTheme.Dark/v1/spacing new file mode 100644 index 00000000..f08ea037 --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Dark/v1/spacing @@ -0,0 +1 @@ +(space_none:0,space_xxxs:4,space_xxs:8,space_xs:12,space_s:16,space_m:24,space_l:32,space_xl:48,space_xxl:64,space_xxxl:128) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark/v1/success b/resources/default_schema/com.system76.CosmicTheme.Dark/v1/success new file mode 100644 index 00000000..a2b7dc94 --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Dark/v1/success @@ -0,0 +1 @@ +(base:(red:0.6745098,green:0.96862745,blue:0.8235294,alpha:1.0),hover:(red:0.42745098,green:0.5745098,blue:0.5019608,alpha:1.0),pressed:(red:0.38039216,green:0.527451,blue:0.45490196,alpha:1.0),selected:(red:0.42745098,green:0.5745098,blue:0.5019608,alpha:1.0),selected_text:(red:0.5803922,green:0.92156863,blue:0.92156863,alpha:1.0),focus:(red:0.5803922,green:0.92156863,blue:0.92156863,alpha:1.0),divider:(red:0.0,green:0.0,blue:0.0,alpha:1.0),on:(red:0.0,green:0.0,blue:0.0,alpha:1.0),disabled:(red:0.6745098,green:0.96862745,blue:0.8235294,alpha:1.0),on_disabled:(red:0.3372549,green:0.48431373,blue:0.4117647,alpha:1.0),border:(red:0.6745098,green:0.96862745,blue:0.8235294,alpha:1.0),disabled_border:(red:0.6745098,green:0.96862745,blue:0.8235294,alpha:0.5)) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark/v1/warning b/resources/default_schema/com.system76.CosmicTheme.Dark/v1/warning new file mode 100644 index 00000000..d6316ab9 --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Dark/v1/warning @@ -0,0 +1 @@ +(base:(red:1.0,green:0.94509804,blue:0.61960787,alpha:1.0),hover:(red:0.5901961,green:0.5627451,blue:0.4,alpha:1.0),pressed:(red:0.54313725,green:0.5156863,blue:0.3529412,alpha:1.0),selected:(red:0.5901961,green:0.5627451,blue:0.4,alpha:1.0),selected_text:(red:0.5803922,green:0.92156863,blue:0.92156863,alpha:1.0),focus:(red:0.5803922,green:0.92156863,blue:0.92156863,alpha:1.0),divider:(red:0.0,green:0.0,blue:0.0,alpha:1.0),on:(red:0.0,green:0.0,blue:0.0,alpha:1.0),disabled:(red:1.0,green:0.94509804,blue:0.61960787,alpha:1.0),on_disabled:(red:0.5,green:0.47254902,blue:0.30980393,alpha:1.0),border:(red:1.0,green:0.94509804,blue:0.61960787,alpha:1.0),disabled_border:(red:1.0,green:0.94509804,blue:0.61960787,alpha:0.5)) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v1/accent b/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v1/accent new file mode 100644 index 00000000..4af18322 --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v1/accent @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v1/bg_color b/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v1/bg_color new file mode 100644 index 00000000..4af18322 --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v1/bg_color @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v1/corner_radii b/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v1/corner_radii new file mode 100644 index 00000000..080fc7fe --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v1/corner_radii @@ -0,0 +1 @@ +(radius_0:(0.0,0.0,0.0,0.0),radius_xs:(4.0,4.0,4.0,4.0),radius_s:(8.0,8.0,8.0,8.0),radius_m:(16.0,16.0,16.0,16.0),radius_l:(32.0,32.0,32.0,32.0),radius_xl:(160.0,160.0,160.0,160.0)) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v1/destructive b/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v1/destructive new file mode 100644 index 00000000..4af18322 --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v1/destructive @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v1/neutral_tint b/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v1/neutral_tint new file mode 100644 index 00000000..4af18322 --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v1/neutral_tint @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v1/palette b/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v1/palette new file mode 100644 index 00000000..a1f6e506 --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v1/palette @@ -0,0 +1 @@ +Light((name:"cosmic-light",blue:(red:0.0,green:0.28627452,blue:0.42745098,alpha:1.0),red:(red:0.627451,green:0.14509805,blue:0.16862746,alpha:1.0),green:(red:0.23137255,green:0.43137255,blue:0.2627451,alpha:1.0),yellow:(red:0.5882353,green:0.40784314,blue:0.0,alpha:1.0),gray_1:(red:0.8666667,green:0.8666667,blue:0.8666667,alpha:1.0),gray_2:(red:0.9098039,green:0.9098039,blue:0.9098039,alpha:1.0),gray_3:(red:0.9529412,green:0.9529412,blue:0.9529412,alpha:1.0),neutral_0:(red:1.0,green:1.0,blue:1.0,alpha:1.0),neutral_1:(red:0.8862745,green:0.8862745,blue:0.8862745,alpha:1.0),neutral_2:(red:0.7764706,green:0.7764706,blue:0.7764706,alpha:1.0),neutral_3:(red:0.67058825,green:0.67058825,blue:0.67058825,alpha:1.0),neutral_4:(red:0.5686275,green:0.5686275,blue:0.5686275,alpha:1.0),neutral_5:(red:0.46666667,green:0.46666667,blue:0.46666667,alpha:1.0),neutral_6:(red:0.36862746,green:0.36862746,blue:0.36862746,alpha:1.0),neutral_7:(red:0.2784314,green:0.2784314,blue:0.2784314,alpha:1.0),neutral_8:(red:0.1882353,green:0.1882353,blue:0.1882353,alpha:1.0),neutral_9:(red:0.105882354,green:0.105882354,blue:0.105882354,alpha:1.0),neutral_10:(red:0.0,green:0.0,blue:0.0,alpha:1.0),ext_warm_grey:(red:0.60784316,green:0.5568628,blue:0.5411765,alpha:1.0),ext_orange:(red:0.9843137,green:0.72156864,blue:0.42352942,alpha:1.0),ext_yellow:(red:0.96862745,green:0.8784314,blue:0.38431373,alpha:1.0),ext_blue:(red:0.41568628,green:0.7921569,blue:0.84705883,alpha:1.0),ext_purple:(red:0.8352941,green:0.54901963,blue:1.0,alpha:1.0),ext_pink:(red:1.0,green:0.6117647,blue:0.8666667,alpha:1.0),ext_indigo:(red:0.58431375,green:0.76862746,blue:0.9882353,alpha:1.0),accent_warm_grey:(red:0.6784314,green:0.63529414,blue:0.61960787,alpha:1.0),accent_orange:(red:1.0,green:0.84313726,blue:0.6313726,alpha:1.0),accent_yellow:(red:1.0,green:0.94509804,blue:0.61960787,alpha:1.0),accent_purple:(red:0.8352941,green:0.54901963,blue:1.0,alpha:1.0),accent_pink:(red:1.0,green:0.6117647,blue:0.8666667,alpha:1.0),accent_indigo:(red:0.58431375,green:0.76862746,blue:0.9882353,alpha:1.0))) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v1/primary_container_bg b/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v1/primary_container_bg new file mode 100644 index 00000000..4af18322 --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v1/primary_container_bg @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v1/secondary_container_bg b/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v1/secondary_container_bg new file mode 100644 index 00000000..4af18322 --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v1/secondary_container_bg @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v1/spacing b/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v1/spacing new file mode 100644 index 00000000..f08ea037 --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v1/spacing @@ -0,0 +1 @@ +(space_none:0,space_xxxs:4,space_xxs:8,space_xs:12,space_s:16,space_m:24,space_l:32,space_xl:48,space_xxl:64,space_xxxl:128) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v1/success b/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v1/success new file mode 100644 index 00000000..4af18322 --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v1/success @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v1/text_tint b/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v1/text_tint new file mode 100644 index 00000000..4af18322 --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v1/text_tint @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v1/warning b/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v1/warning new file mode 100644 index 00000000..4af18322 --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v1/warning @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light/v1/accent b/resources/default_schema/com.system76.CosmicTheme.Light/v1/accent new file mode 100644 index 00000000..5e4c6f03 --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Light/v1/accent @@ -0,0 +1 @@ +(base:(red:0.0,green:0.28627452,blue:0.42745098,alpha:1.0),hover:(red:0.30980393,green:0.45294118,blue:0.5235294,alpha:1.0),pressed:(red:0.37254903,green:0.5156863,blue:0.5862745,alpha:1.0),selected:(red:0.30980393,green:0.45294118,blue:0.5235294,alpha:1.0),selected_text:(red:0.0,green:0.28627452,blue:0.42745098,alpha:1.0),focus:(red:0.0,green:0.28627452,blue:0.42745098,alpha:1.0),divider:(red:1.0,green:1.0,blue:1.0,alpha:1.0),on:(red:1.0,green:1.0,blue:1.0,alpha:1.0),disabled:(red:0.0,green:0.28627452,blue:0.42745098,alpha:1.0),on_disabled:(red:0.5,green:0.6431373,blue:0.7137255,alpha:1.0),border:(red:0.0,green:0.28627452,blue:0.42745098,alpha:1.0),disabled_border:(red:0.0,green:0.28627452,blue:0.42745098,alpha:0.5)) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light/v1/background b/resources/default_schema/com.system76.CosmicTheme.Light/v1/background new file mode 100644 index 00000000..ca3cbd1a --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Light/v1/background @@ -0,0 +1 @@ +(base:(red:0.8666667,green:0.8666667,blue:0.8666667,alpha:1.0),component:(base:(red:0.98669606,green:0.98669606,blue:0.98669595,alpha:1.0),hover:(red:0.98802644,green:0.98802644,blue:0.9880264,alpha:1.0),pressed:(red:0.9893569,green:0.9893569,blue:0.98935676,alpha:1.0),selected:(red:0.98802644,green:0.98802644,blue:0.9880264,alpha:1.0),selected_text:(red:0.0,green:0.28627452,blue:0.42745098,alpha:1.0),focus:(red:0.0,green:0.28627452,blue:0.42745098,alpha:1.0),divider:(red:0.17235574,green:0.1723558,blue:0.17235562,alpha:0.2),on:(red:0.17235574,green:0.1723558,blue:0.17235562,alpha:1.0),disabled:(red:0.98669606,green:0.98669606,blue:0.98669595,alpha:1.0),on_disabled:(red:0.5795259,green:0.57952595,blue:0.57952577,alpha:1.0),border:(red:0.1882353,green:0.1882353,blue:0.1882353,alpha:1.0),disabled_border:(red:0.1882353,green:0.1882353,blue:0.1882353,alpha:0.5)),divider:(red:0.710911,green:0.7109109,blue:0.7109109,alpha:1.0),on:(red:0.08788813,green:0.08788807,blue:0.087887965,alpha:1.0)) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light/v1/corner_radii b/resources/default_schema/com.system76.CosmicTheme.Light/v1/corner_radii new file mode 100644 index 00000000..080fc7fe --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Light/v1/corner_radii @@ -0,0 +1 @@ +(radius_0:(0.0,0.0,0.0,0.0),radius_xs:(4.0,4.0,4.0,4.0),radius_s:(8.0,8.0,8.0,8.0),radius_m:(16.0,16.0,16.0,16.0),radius_l:(32.0,32.0,32.0,32.0),radius_xl:(160.0,160.0,160.0,160.0)) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light/v1/destructive b/resources/default_schema/com.system76.CosmicTheme.Light/v1/destructive new file mode 100644 index 00000000..c52317ba --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Light/v1/destructive @@ -0,0 +1 @@ +(base:(red:0.627451,green:0.14509805,blue:0.16862746,alpha:1.0),hover:(red:0.62352943,green:0.38235295,blue:0.39411765,alpha:1.0),pressed:(red:0.6862745,green:0.44509804,blue:0.45686275,alpha:1.0),selected:(red:0.62352943,green:0.38235295,blue:0.39411765,alpha:1.0),selected_text:(red:0.0,green:0.28627452,blue:0.42745098,alpha:1.0),focus:(red:0.0,green:0.28627452,blue:0.42745098,alpha:1.0),divider:(red:1.0,green:1.0,blue:1.0,alpha:1.0),on:(red:1.0,green:1.0,blue:1.0,alpha:1.0),disabled:(red:0.627451,green:0.14509805,blue:0.16862746,alpha:1.0),on_disabled:(red:0.8137255,green:0.57254905,blue:0.58431375,alpha:1.0),border:(red:0.627451,green:0.14509805,blue:0.16862746,alpha:1.0),disabled_border:(red:0.627451,green:0.14509805,blue:0.16862746,alpha:0.5)) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light/v1/is_dark b/resources/default_schema/com.system76.CosmicTheme.Light/v1/is_dark new file mode 100644 index 00000000..02e4a84d --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Light/v1/is_dark @@ -0,0 +1 @@ +false \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light/v1/is_high_contrast b/resources/default_schema/com.system76.CosmicTheme.Light/v1/is_high_contrast new file mode 100644 index 00000000..02e4a84d --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Light/v1/is_high_contrast @@ -0,0 +1 @@ +false \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light/v1/name b/resources/default_schema/com.system76.CosmicTheme.Light/v1/name new file mode 100644 index 00000000..9dce5c68 --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Light/v1/name @@ -0,0 +1 @@ +"cosmic-light" \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light/v1/palette b/resources/default_schema/com.system76.CosmicTheme.Light/v1/palette new file mode 100644 index 00000000..78b85662 --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Light/v1/palette @@ -0,0 +1 @@ +(name:"cosmic-light",blue:(red:0.0,green:0.28627452,blue:0.42745098,alpha:1.0),red:(red:0.627451,green:0.14509805,blue:0.16862746,alpha:1.0),green:(red:0.23137255,green:0.43137255,blue:0.2627451,alpha:1.0),yellow:(red:0.5882353,green:0.40784314,blue:0.0,alpha:1.0),gray_1:(red:0.8666667,green:0.8666667,blue:0.8666667,alpha:1.0),gray_2:(red:0.9098039,green:0.9098039,blue:0.9098039,alpha:1.0),gray_3:(red:0.9529412,green:0.9529412,blue:0.9529412,alpha:1.0),neutral_0:(red:1.0,green:1.0,blue:1.0,alpha:1.0),neutral_1:(red:0.8862745,green:0.8862745,blue:0.8862745,alpha:1.0),neutral_2:(red:0.7764706,green:0.7764706,blue:0.7764706,alpha:1.0),neutral_3:(red:0.67058825,green:0.67058825,blue:0.67058825,alpha:1.0),neutral_4:(red:0.5686275,green:0.5686275,blue:0.5686275,alpha:1.0),neutral_5:(red:0.46666667,green:0.46666667,blue:0.46666667,alpha:1.0),neutral_6:(red:0.36862746,green:0.36862746,blue:0.36862746,alpha:1.0),neutral_7:(red:0.2784314,green:0.2784314,blue:0.2784314,alpha:1.0),neutral_8:(red:0.1882353,green:0.1882353,blue:0.1882353,alpha:1.0),neutral_9:(red:0.105882354,green:0.105882354,blue:0.105882354,alpha:1.0),neutral_10:(red:0.0,green:0.0,blue:0.0,alpha:1.0),ext_warm_grey:(red:0.60784316,green:0.5568628,blue:0.5411765,alpha:1.0),ext_orange:(red:0.9843137,green:0.72156864,blue:0.42352942,alpha:1.0),ext_yellow:(red:0.96862745,green:0.8784314,blue:0.38431373,alpha:1.0),ext_blue:(red:0.41568628,green:0.7921569,blue:0.84705883,alpha:1.0),ext_purple:(red:0.8352941,green:0.54901963,blue:1.0,alpha:1.0),ext_pink:(red:1.0,green:0.6117647,blue:0.8666667,alpha:1.0),ext_indigo:(red:0.58431375,green:0.76862746,blue:0.9882353,alpha:1.0),accent_warm_grey:(red:0.6784314,green:0.63529414,blue:0.61960787,alpha:1.0),accent_orange:(red:1.0,green:0.84313726,blue:0.6313726,alpha:1.0),accent_yellow:(red:1.0,green:0.94509804,blue:0.61960787,alpha:1.0),accent_purple:(red:0.8352941,green:0.54901963,blue:1.0,alpha:1.0),accent_pink:(red:1.0,green:0.6117647,blue:0.8666667,alpha:1.0),accent_indigo:(red:0.58431375,green:0.76862746,blue:0.9882353,alpha:1.0)) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light/v1/primary b/resources/default_schema/com.system76.CosmicTheme.Light/v1/primary new file mode 100644 index 00000000..5a564f44 --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Light/v1/primary @@ -0,0 +1 @@ +(base:(red:0.946989,green:0.9469891,blue:0.9469889,alpha:1.0),component:(base:(red:0.67058825,green:0.67058825,blue:0.67058825,alpha:1.0),hover:(red:0.7035294,green:0.7035294,blue:0.7035294,alpha:1.0),pressed:(red:0.7364706,green:0.7364706,blue:0.7364706,alpha:1.0),selected:(red:0.7035294,green:0.7035294,blue:0.7035294,alpha:1.0),selected_text:(red:0.0,green:0.28627452,blue:0.42745098,alpha:1.0),focus:(red:0.0,green:0.28627452,blue:0.42745098,alpha:1.0),divider:(red:0.0008521937,green:0.0008521911,blue:0.00085218257,alpha:0.2),on:(red:0.0008521937,green:0.0008521911,blue:0.00085218257,alpha:1.0),disabled:(red:0.67058825,green:0.67058825,blue:0.67058825,alpha:1.0),on_disabled:(red:0.3357202,green:0.3357202,blue:0.3357202,alpha:1.0),border:(red:0.1882353,green:0.1882353,blue:0.1882353,alpha:1.0),disabled_border:(red:0.1882353,green:0.1882353,blue:0.1882353,alpha:0.5)),divider:(red:0.78626055,green:0.78626066,blue:0.7862605,alpha:1.0),on:(red:0.14334676,green:0.14334682,blue:0.14334664,alpha:1.0)) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light/v1/secondary b/resources/default_schema/com.system76.CosmicTheme.Light/v1/secondary new file mode 100644 index 00000000..5e7285db --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Light/v1/secondary @@ -0,0 +1 @@ +(base:(red:0.7764706,green:0.7764706,blue:0.7764706,alpha:1.0),component:(base:(red:0.75329685,green:0.75329703,blue:0.75329673,alpha:1.0),hover:(red:0.77796715,green:0.77796733,blue:0.77796704,alpha:1.0),pressed:(red:0.80263746,green:0.80263764,blue:0.8026374,alpha:1.0),selected:(red:0.77796715,green:0.77796733,blue:0.77796704,alpha:1.0),selected_text:(red:0.0,green:0.28627452,blue:0.42745098,alpha:1.0),focus:(red:0.0,green:0.28627452,blue:0.42745098,alpha:1.0),divider:(red:0.017722936,green:0.017722905,blue:0.017722849,alpha:0.2),on:(red:0.017722936,green:0.017722905,blue:0.017722849,alpha:1.0),disabled:(red:0.75329685,green:0.75329703,blue:0.75329673,alpha:1.0),on_disabled:(red:0.3855099,green:0.38550997,blue:0.3855098,alpha:1.0),border:(red:0.1882353,green:0.1882353,blue:0.1882353,alpha:1.0),disabled_border:(red:0.1882353,green:0.1882353,blue:0.1882353,alpha:0.5)),divider:(red:0.62702733,green:0.62702733,blue:0.6270273,alpha:1.0),on:(red:0.029254153,green:0.029254114,blue:0.02925403,alpha:1.0)) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light/v1/spacing b/resources/default_schema/com.system76.CosmicTheme.Light/v1/spacing new file mode 100644 index 00000000..f08ea037 --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Light/v1/spacing @@ -0,0 +1 @@ +(space_none:0,space_xxxs:4,space_xxs:8,space_xs:12,space_s:16,space_m:24,space_l:32,space_xl:48,space_xxl:64,space_xxxl:128) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light/v1/success b/resources/default_schema/com.system76.CosmicTheme.Light/v1/success new file mode 100644 index 00000000..bdd64dc7 --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Light/v1/success @@ -0,0 +1 @@ +(base:(red:0.23137255,green:0.43137255,blue:0.2627451,alpha:1.0),hover:(red:0.4254902,green:0.5254902,blue:0.44117647,alpha:1.0),pressed:(red:0.4882353,green:0.5882353,blue:0.50392157,alpha:1.0),selected:(red:0.4254902,green:0.5254902,blue:0.44117647,alpha:1.0),selected_text:(red:0.0,green:0.28627452,blue:0.42745098,alpha:1.0),focus:(red:0.0,green:0.28627452,blue:0.42745098,alpha:1.0),divider:(red:1.0,green:1.0,blue:1.0,alpha:1.0),on:(red:1.0,green:1.0,blue:1.0,alpha:1.0),disabled:(red:0.23137255,green:0.43137255,blue:0.2627451,alpha:1.0),on_disabled:(red:0.6156863,green:0.71568626,blue:0.6313726,alpha:1.0),border:(red:0.23137255,green:0.43137255,blue:0.2627451,alpha:1.0),disabled_border:(red:0.23137255,green:0.43137255,blue:0.2627451,alpha:0.5)) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light/v1/warning b/resources/default_schema/com.system76.CosmicTheme.Light/v1/warning new file mode 100644 index 00000000..6ec58b8b --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Light/v1/warning @@ -0,0 +1 @@ +(base:(red:0.5882353,green:0.40784314,blue:0.0,alpha:1.0),hover:(red:0.6039216,green:0.5137255,blue:0.30980393,alpha:1.0),pressed:(red:0.6666667,green:0.5764706,blue:0.37254903,alpha:1.0),selected:(red:0.6039216,green:0.5137255,blue:0.30980393,alpha:1.0),selected_text:(red:0.0,green:0.28627452,blue:0.42745098,alpha:1.0),focus:(red:0.0,green:0.28627452,blue:0.42745098,alpha:1.0),divider:(red:1.0,green:1.0,blue:1.0,alpha:1.0),on:(red:1.0,green:1.0,blue:1.0,alpha:1.0),disabled:(red:0.5882353,green:0.40784314,blue:0.0,alpha:1.0),on_disabled:(red:0.7941177,green:0.70392156,blue:0.5,alpha:1.0),border:(red:0.5882353,green:0.40784314,blue:0.0,alpha:1.0),disabled_border:(red:0.5882353,green:0.40784314,blue:0.0,alpha:0.5)) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Mode/v1/auto_switch b/resources/default_schema/com.system76.CosmicTheme.Mode/v1/auto_switch new file mode 100644 index 00000000..02e4a84d --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Mode/v1/auto_switch @@ -0,0 +1 @@ +false \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Mode/v1/is_dark b/resources/default_schema/com.system76.CosmicTheme.Mode/v1/is_dark new file mode 100644 index 00000000..27ba77dd --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Mode/v1/is_dark @@ -0,0 +1 @@ +true From 9fa3460e60bccbdd77db4669a720b243ff966e3f Mon Sep 17 00:00:00 2001 From: Ashley Wulber Date: Wed, 4 Oct 2023 15:53:04 -0400 Subject: [PATCH 05/27] wip: add icons and more widgets to appearance page --- app/src/pages/desktop/appearance.rs | 164 ++++++++++++++---- debian/install | 4 +- i18n/en/cosmic_settings.ftl | 2 + justfile | 11 +- ...lustration-appearance-dark-style-round.svg | 9 + ...n-appearance-dark-style-slightly-round.svg | 9 + ...ustration-appearance-dark-style-square.svg | 9 + ...ustration-appearance-light-style-round.svg | 9 + ...-appearance-light-style-slightly-round.svg | 9 + ...stration-appearance-light-style-square.svg | 9 + .../illustration-appearance-mode-dark.svg | 20 +++ .../illustration-appearance-mode-light.svg | 20 +++ 12 files changed, 242 insertions(+), 33 deletions(-) create mode 100644 resources/icons/scalable/status/illustration-appearance-dark-style-round.svg create mode 100644 resources/icons/scalable/status/illustration-appearance-dark-style-slightly-round.svg create mode 100644 resources/icons/scalable/status/illustration-appearance-dark-style-square.svg create mode 100644 resources/icons/scalable/status/illustration-appearance-light-style-round.svg create mode 100644 resources/icons/scalable/status/illustration-appearance-light-style-slightly-round.svg create mode 100644 resources/icons/scalable/status/illustration-appearance-light-style-square.svg create mode 100644 resources/icons/scalable/status/illustration-appearance-mode-dark.svg create mode 100644 resources/icons/scalable/status/illustration-appearance-mode-light.svg diff --git a/app/src/pages/desktop/appearance.rs b/app/src/pages/desktop/appearance.rs index 80788c87..21c2f803 100644 --- a/app/src/pages/desktop/appearance.rs +++ b/app/src/pages/desktop/appearance.rs @@ -10,6 +10,7 @@ use cosmic::iced::widget::{column, row}; use cosmic::iced::{window, Color}; use cosmic::iced_core::{layout, Length}; use cosmic::iced_sctk::commands::window::{close_window, get_window}; +use cosmic::widget::icon::{from_name, icon}; use cosmic::widget::{ button, container, header_bar, horizontal_space, settings, spin_button, text, ColorPickerModel, ColorPickerUpdate, @@ -43,6 +44,7 @@ pub struct Page { interface_text: ColorPickerModel, control_component: ColorPickerModel, active_dialog: Option, + roundness: Roundness, theme_mode: ThemeMode, theme_builder: ThemeBuilder, @@ -86,12 +88,14 @@ impl Default for Page { } }) .unwrap_or_default(); + // TODO fill these values with the current values Self { accent_window_hint: Default::default(), frosted: Default::default(), window_hint_size: Default::default(), gap_size: Default::default(), can_reset: Default::default(), + roundness: Roundness::Round, custom_accent: ColorPickerModel::new(fl!("hex"), fl!("rgb"), None, None), application_background: ColorPickerModel::new(fl!("hex"), fl!("rgb"), None, None), container_background: ColorPickerModel::new(fl!("hex"), fl!("rgb"), None, None), @@ -120,6 +124,14 @@ pub enum Message { InterfaceText(ColorPickerUpdate), ControlComponent(ColorPickerUpdate), CloseRequested(window::Id), + Roundness(Roundness), +} + +#[derive(Debug, Clone, Copy)] +pub enum Roundness { + Round, + SlightlyRound, + Square, } impl Page { @@ -380,6 +392,10 @@ impl Page { }; Command::none() } + Message::Roundness(r) => { + self.roundness = r; + Command::none() + } }; if theme_builder_needs_update { @@ -508,36 +524,56 @@ pub fn mode_and_colors() -> Section { fl!("control-tint", "desc"), // 12 fl!("window-hint-accent"), + // 13 + fl!("dark"), + fl!("light"), ]) .view::(|_binder, page, section| { let descriptions = §ion.descriptions; settings::view_section(§ion.title) - .add(container(text("TODO")).width(Length::Fill)) + .add( + container( + row![ + column![ + button( + icon(from_name("illustration-appearance-mode-dark").into(),) + .width(Length::Fixed(188.0)) + .height(Length::Fixed(100.0)) + ) + .style(cosmic::theme::Button::IconVertical) + .padding(8) + .on_press(Message::DarkMode(true)), + text(&descriptions[13]) + ] + .spacing(8) + .align_items(cosmic::iced_core::Alignment::Center), + column![ + button( + icon(from_name("illustration-appearance-mode-light").into(),) + .width(Length::Fixed(188.0)) + .height(Length::Fixed(100.0)) + ) + .style(cosmic::theme::Button::IconVertical) + .padding(8) + .on_press(Message::DarkMode(false)), + text(&descriptions[14]) + ] + .spacing(8) + .align_items(cosmic::iced_core::Alignment::Center) + ] + .spacing(48) + .align_items(cosmic::iced_core::Alignment::Center), + ) + .width(Length::Fill) + .align_x(cosmic::iced_core::alignment::Horizontal::Center), + ) .add( settings::item::builder(&descriptions[0]) .description(&descriptions[1]) .toggler(page.theme_mode.auto_switch, Message::Autoswitch), ) - .add(column![ - text(&descriptions[2]), - // if page.container_background.get_is_active() { - // container( - // page. - // .builder(Message::ContainerBackground) - // .build( - // fl!("recent-colors"), - // fl!("copy-to-clipboard"), - // fl!("copied-to-clipboard"), - // ), - // ) - // } else { - // container( - // page.bg_color_model - // .picker_button(Message::ContainerBackground), - // ) - // } - ]) + .add(column![text(&descriptions[2]),]) .add( settings::item::builder(&descriptions[3]).control( page.application_background @@ -600,7 +636,76 @@ pub fn style() -> Section { let descriptions = §ion.descriptions; settings::view_section(§ion.title) - .add(container(text("TODO Toggle Image buttons for roundness")).width(Length::Fill)) + .add( + container( + row![ + column![ + button( + icon( + from_name(if page.theme_mode.is_dark { + "illustration-appearance-dark-style-round" + } else { + "illustration-appearance-light-style-round" + }) + .into() + ) + .width(Length::Fixed(188.0)) + .height(Length::Fixed(100.0)) + ) + .style(cosmic::theme::Button::IconVertical) + .padding(8) + .on_press(Message::Roundness(Roundness::Round)), + text(&descriptions[0]) + ] + .spacing(8) + .align_items(cosmic::iced_core::Alignment::Center), + column![ + button( + icon( + from_name(if page.theme_mode.is_dark { + "illustration-appearance-dark-style-slightly-round" + } else { + "illustration-appearance-light-style-slightly-round" + }) + .into() + ) + .width(Length::Fixed(188.0)) + .height(Length::Fixed(100.0)) + ) + .style(cosmic::theme::Button::IconVertical) + .padding(8) + .on_press(Message::Roundness(Roundness::SlightlyRound)), + text(&descriptions[1]) + ] + .spacing(8) + .align_items(cosmic::iced_core::Alignment::Center), + column![ + button( + icon( + from_name(if page.theme_mode.is_dark { + "illustration-appearance-dark-style-square" + } else { + "illustration-appearance-light-style-square" + }) + .into(), + ) + .width(Length::Fixed(188.0)) + .height(Length::Fixed(100.0)) + ) + .style(cosmic::theme::Button::IconVertical) + .padding(8) + .on_press(Message::Roundness(Roundness::Square)), + text(&descriptions[2]) + ] + .spacing(8) + .align_items(cosmic::iced_core::Alignment::Center) + ] + .spacing(12) + .align_items(cosmic::iced_core::Alignment::Center), + ) + .width(Length::Fill) + .align_x(cosmic::iced_core::alignment::Horizontal::Center), + ) .add( settings::item::builder(&descriptions[3]) .description(&descriptions[4]) @@ -623,14 +728,15 @@ pub fn window_management() -> Section { let descriptions = §ion.descriptions; settings::view_section(§ion.title) - .add( - settings::item::builder(&descriptions[0]) - .control(cosmic::widget::spin_button("", Message::WindowHintSize)), - ) - .add( - settings::item::builder(&descriptions[1]) - .control(cosmic::widget::spin_button("", Message::GapSize)), - ) + .add(settings::item::builder(&descriptions[0]).control( + cosmic::widget::spin_button( + page.window_hint_size.to_string(), + Message::WindowHintSize, + ), + )) + .add(settings::item::builder(&descriptions[1]).control( + cosmic::widget::spin_button(page.gap_size.to_string(), Message::GapSize), + )) .apply(Element::from) .map(crate::pages::Message::Appearance) }) diff --git a/debian/install b/debian/install index 4856aab5..2a30a362 100644 --- a/debian/install +++ b/debian/install @@ -1,2 +1,4 @@ /usr/bin/cosmic-settings -/usr/share/applications/com.system76.CosmicSettings.desktop \ No newline at end of file +/usr/share/applications/com.system76.CosmicSettings.desktop +/usr/share/cosmic/resources/default_schema/com.system76.CosmicTheme.* +/usr/share/icons/hicolor/scalable \ No newline at end of file diff --git a/i18n/en/cosmic_settings.ftl b/i18n/en/cosmic_settings.ftl index b032890d..84d75582 100644 --- a/i18n/en/cosmic_settings.ftl +++ b/i18n/en/cosmic_settings.ftl @@ -27,6 +27,8 @@ text-tint = Interface text tint control-tint = Control component tint .desc = Used for backgrounds of standard buttons, search inputs, text inputs, and similar components. window-hint-accent = Use theme accent color as active window hint +dark = Dark +light = Light color-picker = Color Picker hex = Hex rgb = RGB diff --git a/justfile b/justfile index 5eed17a2..3c2296bf 100644 --- a/justfile +++ b/justfile @@ -30,6 +30,8 @@ desktop := appid + '.desktop' desktop-src := 'resources' / desktop desktop-dest := clean(rootdir / prefix) / 'share' / 'applications' / desktop +iconsdir := clean(rootdir / prefix) / 'share' / 'icons' / 'hicolor' + [private] default: build-release @@ -71,12 +73,13 @@ install-file src dest: (install-cmd '-Dm0644' src dest) # Install everything install: (install-bin bin-src bin-dest) (install-file desktop-src desktop-dest) -find resources/default_schema -type f -exec install -Dm0644 {} {{default-schema-target}}/{} \; + find resources/default_schema -type f -exec install -Dm0644 {} {{default-schema-target}}/{} \; + find 'resources'/'icons' -type f -exec echo {} \; | rev | cut -d'/' -f-3 | rev | xargs -d '\n' -I {} install -Dm0644 'resources'/'icons'/{} {{iconsdir}}/{} # Run the application for testing purposes run *args: env RUST_LOG=debug RUST_BACKTRACE=full cargo run --release {{args}} - + @just resources/icons/install # Run `cargo test` test: cargo test @@ -84,7 +87,9 @@ test: # Uninstalls everything (requires same arguments as given to install) uninstall: rm -rf {{bin-dest}} {{desktop-dest}} - + find resources/default_schema -type f -exec rm {{default-schema-target}}/{} \; + find 'resources'/'icons' -type f -exec echo {} \; | rev | cut -d'/' -f-3 | rev | xargs -d '\n' -I {} rm {{iconsdir}}/{} + # Vendor Cargo dependencies locally vendor: mkdir -p .cargo diff --git a/resources/icons/scalable/status/illustration-appearance-dark-style-round.svg b/resources/icons/scalable/status/illustration-appearance-dark-style-round.svg new file mode 100644 index 00000000..aa89c94b --- /dev/null +++ b/resources/icons/scalable/status/illustration-appearance-dark-style-round.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/resources/icons/scalable/status/illustration-appearance-dark-style-slightly-round.svg b/resources/icons/scalable/status/illustration-appearance-dark-style-slightly-round.svg new file mode 100644 index 00000000..7a49c389 --- /dev/null +++ b/resources/icons/scalable/status/illustration-appearance-dark-style-slightly-round.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/resources/icons/scalable/status/illustration-appearance-dark-style-square.svg b/resources/icons/scalable/status/illustration-appearance-dark-style-square.svg new file mode 100644 index 00000000..e4c35a74 --- /dev/null +++ b/resources/icons/scalable/status/illustration-appearance-dark-style-square.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/resources/icons/scalable/status/illustration-appearance-light-style-round.svg b/resources/icons/scalable/status/illustration-appearance-light-style-round.svg new file mode 100644 index 00000000..5f2313b7 --- /dev/null +++ b/resources/icons/scalable/status/illustration-appearance-light-style-round.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/resources/icons/scalable/status/illustration-appearance-light-style-slightly-round.svg b/resources/icons/scalable/status/illustration-appearance-light-style-slightly-round.svg new file mode 100644 index 00000000..445c02d6 --- /dev/null +++ b/resources/icons/scalable/status/illustration-appearance-light-style-slightly-round.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/resources/icons/scalable/status/illustration-appearance-light-style-square.svg b/resources/icons/scalable/status/illustration-appearance-light-style-square.svg new file mode 100644 index 00000000..dd3f8e99 --- /dev/null +++ b/resources/icons/scalable/status/illustration-appearance-light-style-square.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/resources/icons/scalable/status/illustration-appearance-mode-dark.svg b/resources/icons/scalable/status/illustration-appearance-mode-dark.svg new file mode 100644 index 00000000..a84ced3d --- /dev/null +++ b/resources/icons/scalable/status/illustration-appearance-mode-dark.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/resources/icons/scalable/status/illustration-appearance-mode-light.svg b/resources/icons/scalable/status/illustration-appearance-mode-light.svg new file mode 100644 index 00000000..a77bc12d --- /dev/null +++ b/resources/icons/scalable/status/illustration-appearance-mode-light.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + From 45e321fc19ad7c23e2755d5ea8939a23b7c03b32 Mon Sep 17 00:00:00 2001 From: Ashley Wulber Date: Wed, 4 Oct 2023 18:46:22 -0400 Subject: [PATCH 06/27] wip: set the theme on entering and leaving the appearance panel --- app/src/app.rs | 22 +++++++++++++++++++- app/src/pages/desktop/appearance.rs | 32 +++++++++++++++++++++++++++++ page/src/binder.rs | 8 ++++++++ page/src/lib.rs | 6 ++++++ 4 files changed, 67 insertions(+), 1 deletion(-) diff --git a/app/src/app.rs b/app/src/app.rs index 3d0b18ff..c0881f11 100644 --- a/app/src/app.rs +++ b/app/src/app.rs @@ -1,6 +1,7 @@ // Copyright 2023 System76 // SPDX-License-Identifier: GPL-3.0-only +use color_eyre::owo_colors::OwoColorize; use cosmic::iced::Subscription; use cosmic::{ app::{Command, Core}, @@ -15,6 +16,7 @@ use cosmic::{ }; use cosmic_panel_config::CosmicPanelConfig; use cosmic_settings_page::{self as page, section}; +use page::Page; use crate::config::Config; @@ -54,6 +56,8 @@ pub enum Message { PanelConfig(CosmicPanelConfig), Search(search::Message), SetWindowTitle, + SetSystemTheme, + SetTheme(cosmic::theme::Theme), } impl cosmic::Application for SettingsApp { @@ -305,7 +309,12 @@ impl cosmic::Application for SettingsApp { } } - Message::PanelConfig(_) | Message::Search(_) => {} // Ignored + Message::PanelConfig(_) | Message::Search(_) => {} + Message::SetSystemTheme => { + return cosmic::app::command::set_theme(cosmic::theme::system_preference()); + } + + Message::SetTheme(t) => return cosmic::app::command::set_theme(t), } Command::none() @@ -380,7 +389,17 @@ impl SettingsApp { let current_page = self.active_page; self.active_page = page; + let mut leave_command = iced::Command::none() + .map(Message::PageMessage) + .map(cosmic::app::Message::App); + if current_page != page { + leave_command = self + .pages + .on_leave(current_page) + .unwrap_or(iced::Command::none()) + .map(Message::PageMessage) + .map(cosmic::app::Message::App); self.config.active_page = Box::from(&*self.pages.info[page].id); self.config .set_active_page(Box::from(&*self.pages.info[page].id)); @@ -398,6 +417,7 @@ impl SettingsApp { .map(cosmic::app::Message::App); Command::batch(vec![ + leave_command, page_command, cosmic::command::future(async { Message::SetWindowTitle }) .map(cosmic::app::Message::App), diff --git a/app/src/pages/desktop/appearance.rs b/app/src/pages/desktop/appearance.rs index 21c2f803..66007e1e 100644 --- a/app/src/pages/desktop/appearance.rs +++ b/app/src/pages/desktop/appearance.rs @@ -1,6 +1,8 @@ // Copyright 2023 System76 // SPDX-License-Identifier: GPL-3.0-only +use std::sync::Arc; + use apply::Apply; use cosmic::cosmic_config::{Config, ConfigSet, CosmicConfigEntry}; use cosmic::cosmic_theme::palette::Srgba; @@ -112,6 +114,7 @@ impl Default for Page { #[derive(Debug, Clone)] pub enum Message { + Entered, DarkMode(bool), Autoswitch(bool), AccentWindowHint(bool), @@ -125,6 +128,7 @@ pub enum Message { ControlComponent(ColorPickerUpdate), CloseRequested(window::Id), Roundness(Roundness), + Left, } #[derive(Debug, Clone, Copy)] @@ -396,6 +400,22 @@ impl Page { self.roundness = r; Command::none() } + Message::Entered => { + *self = Self::default(); + let theme_builder = self.theme_builder.clone(); + Command::perform(async {}, |_| { + crate::Message::SetTheme(cosmic::theme::Theme::custom(Arc::new( + // TODO set the values of the theme builder + theme_builder.build(), + ))) + }) + // Load the current theme builders and mode + // Set the theme for the application to match the current mode instead of the system theme? + } + Message::Left => { + dbg!("left"); + Command::perform(async {}, |_| app::Message::SetSystemTheme) + } }; if theme_builder_needs_update { @@ -497,6 +517,18 @@ impl page::Page for Page { .title(fl!("appearance")) .description(fl!("appearance", "desc")) } + + fn load(&self, page: page::Entity) -> Option> { + Some(Box::pin(async move { + crate::pages::Message::Appearance(Message::Entered) + })) + } + + fn on_leave(&mut self) -> Command { + Command::perform(async {}, |_| { + crate::pages::Message::Appearance(Message::Left) + }) + } } #[allow(clippy::too_many_lines)] diff --git a/page/src/binder.rs b/page/src/binder.rs index a3680e12..df509002 100644 --- a/page/src/binder.rs +++ b/page/src/binder.rs @@ -142,6 +142,14 @@ impl Binder { page.downcast_mut::

() } + /// Returns a command when a page is left + pub fn on_leave(&mut self, id: crate::Entity) -> Option> { + if let Some(page) = self.page.get_mut(id) { + return Some(page.on_leave()); + } + None + } + /// Calls a page's load function to refresh its data. pub fn page_reload(&mut self, id: crate::Entity) -> Option> { if let Some(page) = self.page.get(id) { diff --git a/page/src/lib.rs b/page/src/lib.rs index 8a539eab..29921df4 100644 --- a/page/src/lib.rs +++ b/page/src/lib.rs @@ -5,6 +5,7 @@ mod binder; pub use binder::{AutoBind, Binder}; mod insert; +use cosmic::Command; use downcast_rs::{impl_downcast, Downcast}; pub use insert::Insert; @@ -43,6 +44,11 @@ pub trait Page: Downcast { fn load(&self, page: crate::Entity) -> Option> { None } + + /// Emit a command when the page is left + fn on_leave(&mut self) -> Command { + Command::none() + } } impl_downcast!(Page); From 165ddfeb9ada0102854c32493f5ff442f9e3570a Mon Sep 17 00:00:00 2001 From: Ashley Wulber Date: Thu, 5 Oct 2023 11:49:41 -0400 Subject: [PATCH 07/27] cleanup & layout improvements --- app/src/app.rs | 8 ------- app/src/pages/desktop/appearance.rs | 37 +++++++++++++++++------------ 2 files changed, 22 insertions(+), 23 deletions(-) diff --git a/app/src/app.rs b/app/src/app.rs index c0881f11..2dbdcbf9 100644 --- a/app/src/app.rs +++ b/app/src/app.rs @@ -1,7 +1,6 @@ // Copyright 2023 System76 // SPDX-License-Identifier: GPL-3.0-only -use color_eyre::owo_colors::OwoColorize; use cosmic::iced::Subscription; use cosmic::{ app::{Command, Core}, @@ -16,7 +15,6 @@ use cosmic::{ }; use cosmic_panel_config::CosmicPanelConfig; use cosmic_settings_page::{self as page, section}; -use page::Page; use crate::config::Config; @@ -56,7 +54,6 @@ pub enum Message { PanelConfig(CosmicPanelConfig), Search(search::Message), SetWindowTitle, - SetSystemTheme, SetTheme(cosmic::theme::Theme), } @@ -308,12 +305,7 @@ impl cosmic::Application for SettingsApp { .map(cosmic::app::Message::App); } } - Message::PanelConfig(_) | Message::Search(_) => {} - Message::SetSystemTheme => { - return cosmic::app::command::set_theme(cosmic::theme::system_preference()); - } - Message::SetTheme(t) => return cosmic::app::command::set_theme(t), } diff --git a/app/src/pages/desktop/appearance.rs b/app/src/pages/desktop/appearance.rs index 66007e1e..052b616e 100644 --- a/app/src/pages/desktop/appearance.rs +++ b/app/src/pages/desktop/appearance.rs @@ -9,7 +9,7 @@ use cosmic::cosmic_theme::palette::Srgba; use cosmic::cosmic_theme::{Theme, ThemeBuilder, ThemeMode}; use cosmic::iced::wayland::actions::window::SctkWindowSettings; use cosmic::iced::widget::{column, row}; -use cosmic::iced::{window, Color}; +use cosmic::iced::window; use cosmic::iced_core::{layout, Length}; use cosmic::iced_sctk::commands::window::{close_window, get_window}; use cosmic::widget::icon::{from_name, icon}; @@ -262,7 +262,7 @@ impl Page { ColorPickerUpdate::ToggleColorPicker => { // create the color picker dialog // set the active picker - self.active_dialog = Some(NamedColorPicker::ApplicationBackground); + self.active_dialog = Some(NamedColorPicker::ContainerBackground); get_window(color_picker_window_settings()) } _ => Command::none(), @@ -362,7 +362,7 @@ impl Page { }; Command::batch(vec![cmd, self.control_component.update::(u)]) } - Message::CloseRequested(id) => { + Message::CloseRequested(_) => { match self.active_dialog.take() { Some(NamedColorPicker::ApplicationBackground) => { _ = self @@ -412,10 +412,9 @@ impl Page { // Load the current theme builders and mode // Set the theme for the application to match the current mode instead of the system theme? } - Message::Left => { - dbg!("left"); - Command::perform(async {}, |_| app::Message::SetSystemTheme) - } + Message::Left => Command::perform(async {}, |_| { + app::Message::SetTheme(cosmic::theme::system_preference()) + }), }; if theme_builder_needs_update { @@ -457,7 +456,7 @@ impl Page { } // TODO if there were some changes, rebuild and apply to the config - return ret; + ret } pub fn color_picker_view(&self) -> Element { @@ -518,7 +517,7 @@ impl page::Page for Page { .description(fl!("appearance", "desc")) } - fn load(&self, page: page::Entity) -> Option> { + fn load(&self, _: page::Entity) -> Option> { Some(Box::pin(async move { crate::pages::Message::Appearance(Message::Entered) })) @@ -570,7 +569,7 @@ pub fn mode_and_colors() -> Section { column![ button( icon(from_name("illustration-appearance-mode-dark").into(),) - .width(Length::Fixed(188.0)) + .width(Length::Fill) .height(Length::Fixed(100.0)) ) .style(cosmic::theme::Button::IconVertical) @@ -579,11 +578,12 @@ pub fn mode_and_colors() -> Section { text(&descriptions[13]) ] .spacing(8) + .width(Length::FillPortion(1)) .align_items(cosmic::iced_core::Alignment::Center), column![ button( icon(from_name("illustration-appearance-mode-light").into(),) - .width(Length::Fixed(188.0)) + .width(Length::Fill) .height(Length::Fixed(100.0)) ) .style(cosmic::theme::Button::IconVertical) @@ -592,10 +592,12 @@ pub fn mode_and_colors() -> Section { text(&descriptions[14]) ] .spacing(8) + .width(Length::FillPortion(1)) .align_items(cosmic::iced_core::Alignment::Center) ] .spacing(48) - .align_items(cosmic::iced_core::Alignment::Center), + .align_items(cosmic::iced_core::Alignment::Center) + .width(Length::Fixed(424.0)), ) .width(Length::Fill) .align_x(cosmic::iced_core::alignment::Horizontal::Center), @@ -681,7 +683,7 @@ pub fn style() -> Section { }) .into() ) - .width(Length::Fixed(188.0)) + .width(Length::Fill) .height(Length::Fixed(100.0)) ) .style(cosmic::theme::Button::IconVertical) @@ -690,6 +692,7 @@ pub fn style() -> Section { text(&descriptions[0]) ] .spacing(8) + .width(Length::FillPortion(1)) .align_items(cosmic::iced_core::Alignment::Center), column![ button( @@ -701,7 +704,7 @@ pub fn style() -> Section { }) .into() ) - .width(Length::Fixed(188.0)) + .width(Length::Fill) .height(Length::Fixed(100.0)) ) .style(cosmic::theme::Button::IconVertical) @@ -710,6 +713,7 @@ pub fn style() -> Section { text(&descriptions[1]) ] .spacing(8) + .width(Length::FillPortion(1)) .align_items(cosmic::iced_core::Alignment::Center), column![ button( @@ -721,9 +725,10 @@ pub fn style() -> Section { }) .into(), ) - .width(Length::Fixed(188.0)) + .width(Length::Fill) .height(Length::Fixed(100.0)) ) + .width(Length::FillPortion(1)) .style(cosmic::theme::Button::IconVertical) .padding(8) .on_press(Message::Roundness(Roundness::Square)), @@ -731,8 +736,10 @@ pub fn style() -> Section { ] .spacing(8) .align_items(cosmic::iced_core::Alignment::Center) + .width(Length::FillPortion(1)) ] .spacing(12) + .width(Length::Fixed(628.0)) .align_items(cosmic::iced_core::Alignment::Center), ) .width(Length::Fill) From b68668484ea2c8a5b6aec04b904b1471078f1e4e Mon Sep 17 00:00:00 2001 From: Ashley Wulber Date: Thu, 5 Oct 2023 14:20:54 -0400 Subject: [PATCH 08/27] wip(appearance): accent buttons --- app/src/pages/desktop/appearance.rs | 209 +++++++++++++++++++++++++++- 1 file changed, 206 insertions(+), 3 deletions(-) diff --git a/app/src/pages/desktop/appearance.rs b/app/src/pages/desktop/appearance.rs index 052b616e..06146c5f 100644 --- a/app/src/pages/desktop/appearance.rs +++ b/app/src/pages/desktop/appearance.rs @@ -4,14 +4,16 @@ use std::sync::Arc; use apply::Apply; +use cosmic::app::command::message::cosmic; use cosmic::cosmic_config::{Config, ConfigSet, CosmicConfigEntry}; use cosmic::cosmic_theme::palette::Srgba; -use cosmic::cosmic_theme::{Theme, ThemeBuilder, ThemeMode}; +use cosmic::cosmic_theme::{Spacing, Theme, ThemeBuilder, ThemeMode}; use cosmic::iced::wayland::actions::window::SctkWindowSettings; use cosmic::iced::widget::{column, row}; use cosmic::iced::window; use cosmic::iced_core::{layout, Length}; use cosmic::iced_sctk::commands::window::{close_window, get_window}; +use cosmic::iced_widget::scrollable; use cosmic::widget::icon::{from_name, icon}; use cosmic::widget::{ button, container, header_bar, horizontal_space, settings, spin_button, text, ColorPickerModel, @@ -123,6 +125,7 @@ pub enum Message { GapSize(spin_button::Message), ApplicationBackground(ColorPickerUpdate), ContainerBackground(ColorPickerUpdate), + PaletteAccent(cosmic::iced::Color), CustomAccent(ColorPickerUpdate), InterfaceText(ColorPickerUpdate), ControlComponent(ColorPickerUpdate), @@ -415,6 +418,11 @@ impl Page { Message::Left => Command::perform(async {}, |_| { app::Message::SetTheme(cosmic::theme::system_preference()) }), + Message::PaletteAccent(c) => { + self.theme_builder.accent = Some(c.into()); + theme_builder_needs_update = true; + Command::none() + } }; if theme_builder_needs_update { @@ -561,7 +569,12 @@ pub fn mode_and_colors() -> Section { ]) .view::(|_binder, page, section| { let descriptions = §ion.descriptions; - + let palette = &page.theme_builder.palette.as_ref(); + let cur_accent = page + .theme_builder + .accent + .map(|a| cosmic::cosmic_theme::palette::Srgba::from(a)) + .unwrap_or(palette.accent_blue); settings::view_section(§ion.title) .add( container( @@ -607,7 +620,82 @@ pub fn mode_and_colors() -> Section { .description(&descriptions[1]) .toggler(page.theme_mode.auto_switch, Message::Autoswitch), ) - .add(column![text(&descriptions[2]),]) + .add( + column![ + text(&descriptions[2]), + scrollable( + row![ + color_button( + Some(Message::PaletteAccent(palette.accent_blue.into())), + palette.accent_blue.into(), + cur_accent == palette.accent_blue, + ), + color_button( + Some(Message::PaletteAccent(palette.accent_indigo.into())), + palette.accent_indigo.into(), + cur_accent == palette.accent_indigo, + ), + color_button( + Some(Message::PaletteAccent(palette.accent_purple.into())), + palette.accent_purple.into(), + cur_accent == palette.accent_purple, + ), + color_button( + Some(Message::PaletteAccent(palette.accent_pink.into())), + palette.accent_pink.into(), + cur_accent == palette.accent_pink, + ), + color_button( + Some(Message::PaletteAccent(palette.accent_red.into())), + palette.accent_red.into(), + cur_accent == palette.accent_red, + ), + color_button( + Some(Message::PaletteAccent(palette.accent_red.into())), + palette.accent_red.into(), + cur_accent == palette.accent_red, + ), + color_button( + Some(Message::PaletteAccent(palette.accent_orange.into())), + palette.accent_orange.into(), + cur_accent == palette.accent_orange, + ), + color_button( + Some(Message::PaletteAccent(palette.accent_yellow.into())), + palette.accent_yellow.into(), + cur_accent == palette.accent_yellow, + ), + color_button( + Some(Message::PaletteAccent(palette.accent_green.into())), + palette.accent_green.into(), + cur_accent == palette.accent_green, + ), + color_button( + Some(Message::PaletteAccent(palette.accent_warm_grey.into())), + palette.accent_warm_grey.into(), + cur_accent == palette.accent_warm_grey, + ), + style_color_button( + page.custom_accent.picker_button(Message::CustomAccent), + page.custom_accent + .get_applied_color() + .unwrap_or(cosmic::iced::Color::BLACK), + page.custom_accent.get_applied_color() + == Some(cur_accent.into()) + ) + .width(Length::Fixed(48.0)) + .height(Length::Fixed(48.0)) + ] + .padding([0, 0, 16, 0]) + .spacing(16) + ) + .direction(scrollable::Direction::Horizontal( + scrollable::Properties::new() + )) + ] + .padding([16, 24, 0, 24]) + .spacing(8), + ) .add( settings::item::builder(&descriptions[3]).control( page.application_background @@ -815,3 +903,118 @@ fn color_picker_window_settings() -> SctkWindowSettings { transparent: true, } } + +// TODO replace with image button / toggle buttons +fn color_button<'a, Message: 'a>( + on_press: Option, + color: cosmic::iced::Color, + selected: bool, +) -> cosmic::widget::Button<'a, Message, cosmic::Renderer> { + let ret = button(cosmic::widget::vertical_space(Length::Fixed(f32::from( + 48.0, + )))) + .width(Length::Fixed(f32::from(48.0))) + .height(Length::Fixed(f32::from(48.0))) + .on_press_maybe(on_press); + style_color_button(ret, color, selected) +} + +fn style_color_button<'a, Message: 'a>( + b: button::Button<'a, Message, cosmic::Renderer>, + color: cosmic::iced::Color, + selected: bool, +) -> button::Button<'a, Message, cosmic::Renderer> { + b.style(cosmic::theme::Button::Custom { + active: Box::new(move |focused, theme| { + let cosmic = theme.cosmic(); + + let (outline_width, outline_color) = if focused { + (1.0, cosmic.accent_color().into()) + } else { + (0.0, cosmic::iced::Color::TRANSPARENT) + }; + cosmic::widget::button::Appearance { + shadow_offset: cosmic::iced_core::Vector::default(), + background: Some(color.into()), + border_radius: cosmic.radius_xs().into(), + border_width: 1.0, + border_color: if selected { + cosmic.on_bg_color().into() + } else { + cosmic::iced::Color::TRANSPARENT + }, + outline_width, + outline_color, + icon_color: None, + text_color: None, + } + }), + disabled: Box::new(move |theme| { + let cosmic = theme.cosmic(); + + cosmic::widget::button::Appearance { + shadow_offset: cosmic::iced_core::Vector::default(), + background: Some(color.into()), + border_radius: cosmic.radius_xs().into(), + border_width: 1.0, + border_color: if selected { + cosmic.on_bg_color().into() + } else { + cosmic::iced::Color::TRANSPARENT + }, + outline_width: 0.0, + outline_color: cosmic::iced::Color::TRANSPARENT, + icon_color: None, + text_color: None, + } + }), + hovered: Box::new(move |focused, theme| { + let cosmic = theme.cosmic(); + + let (outline_width, outline_color) = if focused { + (1.0, cosmic.accent_color().into()) + } else { + (0.0, cosmic::iced::Color::TRANSPARENT) + }; + cosmic::widget::button::Appearance { + shadow_offset: cosmic::iced_core::Vector::default(), + background: Some(color.into()), + border_radius: cosmic.radius_xs().into(), + border_width: 1.0, + border_color: if selected { + cosmic.on_bg_color().into() + } else { + cosmic::iced::Color::TRANSPARENT + }, + outline_width, + outline_color, + icon_color: None, + text_color: None, + } + }), + pressed: Box::new(move |focused, theme| { + let cosmic = theme.cosmic(); + + let (outline_width, outline_color) = if focused { + (1.0, cosmic.accent_color().into()) + } else { + (0.0, cosmic::iced::Color::TRANSPARENT) + }; + cosmic::widget::button::Appearance { + shadow_offset: cosmic::iced_core::Vector::default(), + background: Some(color.into()), + border_radius: cosmic.radius_xs().into(), + border_width: 1.0, + border_color: if selected { + cosmic.on_bg_color().into() + } else { + cosmic::iced::Color::TRANSPARENT + }, + outline_width, + outline_color, + icon_color: None, + text_color: None, + } + }), + }) +} From c42c8eb3dd73183cb909ec9858af1e73d9295edf Mon Sep 17 00:00:00 2001 From: Ashley Wulber Date: Thu, 5 Oct 2023 17:57:37 -0400 Subject: [PATCH 09/27] fixes fix default schemas, install methods, and appearance page --- app/src/pages/desktop/appearance.rs | 189 ++++++++++++------ debian/install | 6 +- justfile | 4 +- .../v1/is_dark | 1 + .../v1/palette | 2 +- .../com.system76.CosmicTheme.Dark/v1/palette | 2 +- .../v1/palette | 2 +- .../com.system76.CosmicTheme.Light/v1/palette | 2 +- .../com.system76.CosmicTheme.Mode/v1/is_dark | 2 +- 9 files changed, 145 insertions(+), 65 deletions(-) create mode 100644 resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v1/is_dark diff --git a/app/src/pages/desktop/appearance.rs b/app/src/pages/desktop/appearance.rs index 06146c5f..3af10e78 100644 --- a/app/src/pages/desktop/appearance.rs +++ b/app/src/pages/desktop/appearance.rs @@ -4,14 +4,13 @@ use std::sync::Arc; use apply::Apply; -use cosmic::app::command::message::cosmic; use cosmic::cosmic_config::{Config, ConfigSet, CosmicConfigEntry}; -use cosmic::cosmic_theme::palette::Srgba; -use cosmic::cosmic_theme::{Spacing, Theme, ThemeBuilder, ThemeMode}; +use cosmic::cosmic_theme::palette::{Srgb, Srgba}; +use cosmic::cosmic_theme::{CornerRadii, Theme, ThemeBuilder, ThemeMode}; use cosmic::iced::wayland::actions::window::SctkWindowSettings; use cosmic::iced::widget::{column, row}; use cosmic::iced::window; -use cosmic::iced_core::{layout, Length}; +use cosmic::iced_core::{layout, Color, Length}; use cosmic::iced_sctk::commands::window::{close_window, get_window}; use cosmic::iced_widget::scrollable; use cosmic::widget::icon::{from_name, icon}; @@ -74,13 +73,19 @@ impl Default for Page { }) .unwrap_or_default(); + (theme_mode_config, theme_mode).into() + } +} + +impl From<(Option, ThemeMode)> for Page { + fn from((theme_mode_config, theme_mode): (Option, ThemeMode)) -> Self { let theme_builder_config = if theme_mode.is_dark { ThemeBuilder::dark_config() } else { ThemeBuilder::light_config() } .ok(); - let theme_builder = theme_mode_config + let theme_builder = theme_builder_config .as_ref() .map(|c| match ThemeBuilder::get_entry(c) { Ok(t) => t, @@ -91,20 +96,55 @@ impl Default for Page { t } }) - .unwrap_or_default(); - // TODO fill these values with the current values + .unwrap_or_else(|| { + if theme_mode.is_dark { + ThemeBuilder::dark() + } else { + ThemeBuilder::light() + } + }); + // TODO fill all these values with the current values Self { accent_window_hint: Default::default(), frosted: Default::default(), window_hint_size: Default::default(), gap_size: Default::default(), - can_reset: Default::default(), - roundness: Roundness::Round, - custom_accent: ColorPickerModel::new(fl!("hex"), fl!("rgb"), None, None), - application_background: ColorPickerModel::new(fl!("hex"), fl!("rgb"), None, None), - container_background: ColorPickerModel::new(fl!("hex"), fl!("rgb"), None, None), - interface_text: ColorPickerModel::new(fl!("hex"), fl!("rgb"), None, None), - control_component: ColorPickerModel::new(fl!("hex"), fl!("rgb"), None, None), + can_reset: if theme_mode.is_dark { + theme_builder == ThemeBuilder::dark() + } else { + theme_builder == ThemeBuilder::light() + }, + roundness: theme_builder.corner_radii.into(), + custom_accent: ColorPickerModel::new( + fl!("hex"), + fl!("rgb"), + None, + theme_builder.accent.map(Color::from), + ), + application_background: ColorPickerModel::new( + fl!("hex"), + fl!("rgb"), + None, + theme_builder.bg_color.map(Color::from), + ), + container_background: ColorPickerModel::new( + fl!("hex"), + fl!("rgb"), + None, + theme_builder.primary_container_bg.map(Color::from), + ), + interface_text: ColorPickerModel::new( + fl!("hex"), + fl!("rgb"), + None, + theme_builder.text_tint.map(Color::from), + ), + control_component: ColorPickerModel::new( + fl!("hex"), + fl!("rgb"), + None, + theme_builder.neutral_tint.map(Color::from), + ), active_dialog: None, theme_mode_config, theme_builder_config, @@ -141,12 +181,55 @@ pub enum Roundness { Square, } +impl From for CornerRadii { + fn from(value: Roundness) -> Self { + match value { + Roundness::Round => CornerRadii { + radius_0: [0.0; 4], + radius_xs: [4.0; 4], + radius_s: [8.0; 4], + radius_m: [16.0; 4], + radius_l: [32.0; 4], + radius_xl: [160.0; 4], + }, + Roundness::SlightlyRound => CornerRadii { + radius_0: [0.0; 4], + radius_xs: [2.0; 4], + radius_s: [8.0; 4], + radius_m: [8.0; 4], + radius_l: [8.0; 4], + radius_xl: [8.0; 4], + }, + Roundness::Square => CornerRadii { + radius_0: [0.0; 4], + radius_xs: [2.0; 4], + radius_s: [2.0; 4], + radius_m: [2.0; 4], + radius_l: [2.0; 4], + radius_xl: [2.0; 4], + }, + } + } +} + +impl From for Roundness { + fn from(value: CornerRadii) -> Self { + if value.radius_m[0] == 16.0 { + Self::Round + } else if value.radius_m[0] == 8.0 { + Self::SlightlyRound + } else { + Self::Square + } + } +} + impl Page { #[allow(clippy::too_many_lines)] pub fn update(&mut self, message: Message) -> Command { let mut theme_builder_needs_update = false; - let ret = match message { + let mut ret = match message { Message::DarkMode(enabled) => { self.theme_mode.is_dark = enabled; if let Some(config) = self.theme_mode_config.as_ref() { @@ -155,26 +238,15 @@ impl Page { _ = config.set::("is_dark", enabled); } } - let theme_builder_config = if enabled { - ThemeBuilder::dark_config() - } else { - ThemeBuilder::light_config() - } - .ok(); - if let Some(config) = theme_builder_config.as_ref() { - self.theme_builder = match ThemeBuilder::get_entry(config) { - Ok(tb) => tb, - Err((errors, tb)) => { - for e in errors { - tracing::error!("{e}"); - } - tb - } - }; - } else { - tracing::error!("Failed to load the theme builder config."); - } - Command::none() + *self = Self::from((self.theme_mode_config.clone(), self.theme_mode)); + + let theme_builder = self.theme_builder.clone(); + Command::perform(async {}, |_| { + crate::Message::SetTheme(cosmic::theme::Theme::custom(Arc::new( + // TODO set the values of the theme builder + theme_builder.build(), + ))) + }) } Message::Autoswitch(enabled) => { self.theme_mode.auto_switch = enabled; @@ -303,7 +375,10 @@ impl Page { } _ => Command::none(), }; - Command::batch(vec![cmd, self.custom_accent.update::(u)]) + let cmd2 = self.custom_accent.update::(u); + + self.theme_builder.accent = self.custom_accent.get_applied_color().map(Srgb::from); + Command::batch(vec![cmd, cmd2]) } Message::InterfaceText(u) => { let cmd = match &u { @@ -430,21 +505,16 @@ impl Page { return ret; }; let mut theme_builder = std::mem::take(&mut self.theme_builder); - if let Some(c) = self.application_background.get_applied_color() { - theme_builder = theme_builder.bg_color(c.into()); - } - if let Some(c) = self.container_background.get_applied_color() { - theme_builder = theme_builder.primary_container_bg(c.into()); - } - if let Some(c) = self.custom_accent.get_applied_color() { - theme_builder = theme_builder.accent(c.into()); - } - if let Some(c) = self.interface_text.get_applied_color() { - theme_builder = theme_builder.text_tint(c.into()); - } - if let Some(c) = self.control_component.get_applied_color() { - theme_builder = theme_builder.neutral_tint(c.into()); - } + theme_builder.bg_color = self + .application_background + .get_applied_color() + .map(Srgba::from); + theme_builder.primary_container_bg = self + .container_background + .get_applied_color() + .map(Srgba::from); + theme_builder.text_tint = self.interface_text.get_applied_color().map(Srgb::from); + theme_builder.neutral_tint = self.control_component.get_applied_color().map(Srgb::from); _ = theme_builder.write_entry(config); @@ -461,6 +531,16 @@ impl Page { } else { tracing::error!("Failed to get the theme config."); } + let theme_builder = self.theme_builder.clone(); + ret = Command::batch(vec![ + ret, + Command::perform(async {}, |_| { + crate::Message::SetTheme(cosmic::theme::Theme::custom(Arc::new( + // TODO set the values of the theme builder + theme_builder.build(), + ))) + }), + ]) } // TODO if there were some changes, rebuild and apply to the config @@ -573,7 +653,7 @@ pub fn mode_and_colors() -> Section { let cur_accent = page .theme_builder .accent - .map(|a| cosmic::cosmic_theme::palette::Srgba::from(a)) + .map(|a| Srgba::from(a)) .unwrap_or(palette.accent_blue); settings::view_section(§ion.title) .add( @@ -650,11 +730,6 @@ pub fn mode_and_colors() -> Section { palette.accent_red.into(), cur_accent == palette.accent_red, ), - color_button( - Some(Message::PaletteAccent(palette.accent_red.into())), - palette.accent_red.into(), - cur_accent == palette.accent_red, - ), color_button( Some(Message::PaletteAccent(palette.accent_orange.into())), palette.accent_orange.into(), diff --git a/debian/install b/debian/install index 2a30a362..e7db1656 100644 --- a/debian/install +++ b/debian/install @@ -1,4 +1,8 @@ /usr/bin/cosmic-settings /usr/share/applications/com.system76.CosmicSettings.desktop -/usr/share/cosmic/resources/default_schema/com.system76.CosmicTheme.* +/usr/share/cosmic/com.system76.CosmicTheme.Dark +/usr/share/cosmic/com.system76.CosmicTheme.Dark.Builder +/usr/share/cosmic/com.system76.CosmicTheme.Light +/usr/share/cosmic/com.system76.CosmicTheme.Light.Builder +/usr/share/cosmic/com.system76.CosmicTheme.Mode /usr/share/icons/hicolor/scalable \ No newline at end of file diff --git a/justfile b/justfile index 3c2296bf..5c179878 100644 --- a/justfile +++ b/justfile @@ -73,7 +73,7 @@ install-file src dest: (install-cmd '-Dm0644' src dest) # Install everything install: (install-bin bin-src bin-dest) (install-file desktop-src desktop-dest) - find resources/default_schema -type f -exec install -Dm0644 {} {{default-schema-target}}/{} \; + find 'resources'/'default_schema' -type f -exec echo {} \; | rev | cut -d'/' -f-3 | rev | xargs -d '\n' -I {} install -Dm0644 'resources'/'default_schema'/{} {{default-schema-target}}/{} find 'resources'/'icons' -type f -exec echo {} \; | rev | cut -d'/' -f-3 | rev | xargs -d '\n' -I {} install -Dm0644 'resources'/'icons'/{} {{iconsdir}}/{} # Run the application for testing purposes @@ -87,7 +87,7 @@ test: # Uninstalls everything (requires same arguments as given to install) uninstall: rm -rf {{bin-dest}} {{desktop-dest}} - find resources/default_schema -type f -exec rm {{default-schema-target}}/{} \; + find 'resources'/'default_schema' -type f -exec echo {} \; | rev | cut -d'/' -f-3 | rev | xargs -d '\n' -I {} rm -rf {{default-schema-target}}/{} find 'resources'/'icons' -type f -exec echo {} \; | rev | cut -d'/' -f-3 | rev | xargs -d '\n' -I {} rm {{iconsdir}}/{} # Vendor Cargo dependencies locally diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v1/is_dark b/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v1/is_dark new file mode 100644 index 00000000..f32a5804 --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v1/is_dark @@ -0,0 +1 @@ +true \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v1/palette b/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v1/palette index 066764a0..604e4427 100644 --- a/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v1/palette +++ b/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v1/palette @@ -1 +1 @@ -Dark((name:"cosmic-dark",blue:(red:0.5803922,green:0.92156863,blue:0.92156863,alpha:1.0),red:(red:1.0,green:0.70980394,blue:0.70980394,alpha:1.0),green:(red:0.6745098,green:0.96862745,blue:0.8235294,alpha:1.0),yellow:(red:1.0,green:0.94509804,blue:0.61960787,alpha:1.0),gray_1:(red:0.105882354,green:0.105882354,blue:0.105882354,alpha:1.0),gray_2:(red:0.14901961,green:0.14901961,blue:0.14901961,alpha:1.0),gray_3:(red:0.1882353,green:0.1882353,blue:0.1882353,alpha:1.0),neutral_0:(red:0.0,green:0.0,blue:0.0,alpha:1.0),neutral_1:(red:0.105882354,green:0.105882354,blue:0.105882354,alpha:1.0),neutral_2:(red:0.1882353,green:0.1882353,blue:0.1882353,alpha:1.0),neutral_3:(red:0.2784314,green:0.2784314,blue:0.2784314,alpha:1.0),neutral_4:(red:0.36862746,green:0.36862746,blue:0.36862746,alpha:1.0),neutral_5:(red:0.46666667,green:0.46666667,blue:0.46666667,alpha:1.0),neutral_6:(red:0.5686275,green:0.5686275,blue:0.5686275,alpha:1.0),neutral_7:(red:0.67058825,green:0.67058825,blue:0.67058825,alpha:1.0),neutral_8:(red:0.7764706,green:0.7764706,blue:0.7764706,alpha:1.0),neutral_9:(red:0.8862745,green:0.8862745,blue:0.8862745,alpha:1.0),neutral_10:(red:1.0,green:1.0,blue:1.0,alpha:1.0),ext_warm_grey:(red:0.60784316,green:0.5568628,blue:0.5411765,alpha:1.0),ext_orange:(red:1.0,green:0.6784314,blue:0.0,alpha:1.0),ext_yellow:(red:0.99607843,green:0.85882354,blue:0.2509804,alpha:1.0),ext_blue:(red:0.28235295,green:0.7254902,blue:0.78039217,alpha:1.0),ext_purple:(red:0.8117647,green:0.49019608,blue:1.0,alpha:1.0),ext_pink:(red:0.9764706,green:0.22745098,blue:0.5137255,alpha:1.0),ext_indigo:(red:0.24313726,green:0.53333336,blue:1.0,alpha:1.0),accent_warm_grey:(red:0.33333334,green:0.2784314,blue:0.25882354,alpha:1.0),accent_orange:(red:0.6862745,green:0.36078432,blue:0.007843138,alpha:1.0),accent_yellow:(red:0.5882353,green:0.40784314,blue:0.0,alpha:1.0),accent_purple:(red:0.5058824,green:0.24705882,blue:1.0,alpha:1.0),accent_pink:(red:0.9764706,green:0.22745098,blue:0.5137255,alpha:1.0),accent_indigo:(red:0.24313726,green:0.53333336,blue:1.0,alpha:1.0))) \ No newline at end of file +Dark((name:"cosmic-dark",blue:(red:0.5803922,green:0.92156863,blue:0.92156863,alpha:1.0),red:(red:1.0,green:0.70980394,blue:0.70980394,alpha:1.0),green:(red:0.6745098,green:0.96862745,blue:0.8235294,alpha:1.0),yellow:(red:1.0,green:0.94509804,blue:0.61960787,alpha:1.0),gray_1:(red:0.105882354,green:0.105882354,blue:0.105882354,alpha:1.0),gray_2:(red:0.14901961,green:0.14901961,blue:0.14901961,alpha:1.0),gray_3:(red:0.1882353,green:0.1882353,blue:0.1882353,alpha:1.0),neutral_0:(red:0.0,green:0.0,blue:0.0,alpha:1.0),neutral_1:(red:0.105882354,green:0.105882354,blue:0.105882354,alpha:1.0),neutral_2:(red:0.1882353,green:0.1882353,blue:0.1882353,alpha:1.0),neutral_3:(red:0.2784314,green:0.2784314,blue:0.2784314,alpha:1.0),neutral_4:(red:0.36862746,green:0.36862746,blue:0.36862746,alpha:1.0),neutral_5:(red:0.46666667,green:0.46666667,blue:0.46666667,alpha:1.0),neutral_6:(red:0.5686275,green:0.5686275,blue:0.5686275,alpha:1.0),neutral_7:(red:0.67058825,green:0.67058825,blue:0.67058825,alpha:1.0),neutral_8:(red:0.7764706,green:0.7764706,blue:0.7764706,alpha:1.0),neutral_9:(red:0.8862745,green:0.8862745,blue:0.8862745,alpha:1.0),neutral_10:(red:1.0,green:1.0,blue:1.0,alpha:1.0),bright_green:(red:0.36862746,green:0.85882354,blue:0.54901963,alpha:1.0),bright_red:(red:1.0,green:0.627451,blue:0.5647059,alpha:1.0),bright_orange:(red:1.0,green:0.6392157,blue:0.49019608,alpha:1.0),ext_warm_grey:(red:0.60784316,green:0.5568628,blue:0.5411765,alpha:1.0),ext_orange:(red:1.0,green:0.6784314,blue:0.0,alpha:1.0),ext_yellow:(red:0.99607843,green:0.85882354,blue:0.2509804,alpha:1.0),ext_blue:(red:0.28235295,green:0.7254902,blue:0.78039217,alpha:1.0),ext_purple:(red:0.8117647,green:0.49019608,blue:1.0,alpha:1.0),ext_pink:(red:0.9764706,green:0.22745098,blue:0.5137255,alpha:1.0),ext_indigo:(red:0.24313726,green:0.53333336,blue:1.0,alpha:1.0),accent_blue:(red:0.3882353,green:0.8156863,blue:0.8745098,alpha:1.0),accent_red:(red:0.99215686,green:0.6313726,blue:0.627451,alpha:1.0),accent_green:(red:0.57254905,green:0.8117647,blue:0.6117647,alpha:1.0),accent_warm_grey:(red:0.7921569,green:0.7294118,blue:0.7058824,alpha:1.0),accent_orange:(red:1.0,green:0.6784314,blue:0.0,alpha:1.0),accent_yellow:(red:0.96862745,green:0.8784314,blue:0.38431373,alpha:1.0),accent_purple:(red:0.90588236,green:0.6117647,blue:0.99607843,alpha:1.0),accent_pink:(red:1.0,green:0.6117647,blue:0.69411767,alpha:1.0),accent_indigo:(red:0.6313726,green:0.7529412,blue:0.92156863,alpha:1.0))) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark/v1/palette b/resources/default_schema/com.system76.CosmicTheme.Dark/v1/palette index f48e53e5..e7768382 100644 --- a/resources/default_schema/com.system76.CosmicTheme.Dark/v1/palette +++ b/resources/default_schema/com.system76.CosmicTheme.Dark/v1/palette @@ -1 +1 @@ -(name:"cosmic-dark",blue:(red:0.5803922,green:0.92156863,blue:0.92156863,alpha:1.0),red:(red:1.0,green:0.70980394,blue:0.70980394,alpha:1.0),green:(red:0.6745098,green:0.96862745,blue:0.8235294,alpha:1.0),yellow:(red:1.0,green:0.94509804,blue:0.61960787,alpha:1.0),gray_1:(red:0.105882354,green:0.105882354,blue:0.105882354,alpha:1.0),gray_2:(red:0.14901961,green:0.14901961,blue:0.14901961,alpha:1.0),gray_3:(red:0.1882353,green:0.1882353,blue:0.1882353,alpha:1.0),neutral_0:(red:0.0,green:0.0,blue:0.0,alpha:1.0),neutral_1:(red:0.105882354,green:0.105882354,blue:0.105882354,alpha:1.0),neutral_2:(red:0.1882353,green:0.1882353,blue:0.1882353,alpha:1.0),neutral_3:(red:0.2784314,green:0.2784314,blue:0.2784314,alpha:1.0),neutral_4:(red:0.36862746,green:0.36862746,blue:0.36862746,alpha:1.0),neutral_5:(red:0.46666667,green:0.46666667,blue:0.46666667,alpha:1.0),neutral_6:(red:0.5686275,green:0.5686275,blue:0.5686275,alpha:1.0),neutral_7:(red:0.67058825,green:0.67058825,blue:0.67058825,alpha:1.0),neutral_8:(red:0.7764706,green:0.7764706,blue:0.7764706,alpha:1.0),neutral_9:(red:0.8862745,green:0.8862745,blue:0.8862745,alpha:1.0),neutral_10:(red:1.0,green:1.0,blue:1.0,alpha:1.0),ext_warm_grey:(red:0.60784316,green:0.5568628,blue:0.5411765,alpha:1.0),ext_orange:(red:1.0,green:0.6784314,blue:0.0,alpha:1.0),ext_yellow:(red:0.99607843,green:0.85882354,blue:0.2509804,alpha:1.0),ext_blue:(red:0.28235295,green:0.7254902,blue:0.78039217,alpha:1.0),ext_purple:(red:0.8117647,green:0.49019608,blue:1.0,alpha:1.0),ext_pink:(red:0.9764706,green:0.22745098,blue:0.5137255,alpha:1.0),ext_indigo:(red:0.24313726,green:0.53333336,blue:1.0,alpha:1.0),accent_warm_grey:(red:0.33333334,green:0.2784314,blue:0.25882354,alpha:1.0),accent_orange:(red:0.6862745,green:0.36078432,blue:0.007843138,alpha:1.0),accent_yellow:(red:0.5882353,green:0.40784314,blue:0.0,alpha:1.0),accent_purple:(red:0.5058824,green:0.24705882,blue:1.0,alpha:1.0),accent_pink:(red:0.9764706,green:0.22745098,blue:0.5137255,alpha:1.0),accent_indigo:(red:0.24313726,green:0.53333336,blue:1.0,alpha:1.0)) \ No newline at end of file +(name:"cosmic-dark",blue:(red:0.5803922,green:0.92156863,blue:0.92156863,alpha:1.0),red:(red:1.0,green:0.70980394,blue:0.70980394,alpha:1.0),green:(red:0.6745098,green:0.96862745,blue:0.8235294,alpha:1.0),yellow:(red:1.0,green:0.94509804,blue:0.61960787,alpha:1.0),gray_1:(red:0.105882354,green:0.105882354,blue:0.105882354,alpha:1.0),gray_2:(red:0.14901961,green:0.14901961,blue:0.14901961,alpha:1.0),gray_3:(red:0.1882353,green:0.1882353,blue:0.1882353,alpha:1.0),neutral_0:(red:0.0,green:0.0,blue:0.0,alpha:1.0),neutral_1:(red:0.105882354,green:0.105882354,blue:0.105882354,alpha:1.0),neutral_2:(red:0.1882353,green:0.1882353,blue:0.1882353,alpha:1.0),neutral_3:(red:0.2784314,green:0.2784314,blue:0.2784314,alpha:1.0),neutral_4:(red:0.36862746,green:0.36862746,blue:0.36862746,alpha:1.0),neutral_5:(red:0.46666667,green:0.46666667,blue:0.46666667,alpha:1.0),neutral_6:(red:0.5686275,green:0.5686275,blue:0.5686275,alpha:1.0),neutral_7:(red:0.67058825,green:0.67058825,blue:0.67058825,alpha:1.0),neutral_8:(red:0.7764706,green:0.7764706,blue:0.7764706,alpha:1.0),neutral_9:(red:0.8862745,green:0.8862745,blue:0.8862745,alpha:1.0),neutral_10:(red:1.0,green:1.0,blue:1.0,alpha:1.0),bright_green:(red:0.36862746,green:0.85882354,blue:0.54901963,alpha:1.0),bright_red:(red:1.0,green:0.627451,blue:0.5647059,alpha:1.0),bright_orange:(red:1.0,green:0.6392157,blue:0.49019608,alpha:1.0),ext_warm_grey:(red:0.60784316,green:0.5568628,blue:0.5411765,alpha:1.0),ext_orange:(red:1.0,green:0.6784314,blue:0.0,alpha:1.0),ext_yellow:(red:0.99607843,green:0.85882354,blue:0.2509804,alpha:1.0),ext_blue:(red:0.28235295,green:0.7254902,blue:0.78039217,alpha:1.0),ext_purple:(red:0.8117647,green:0.49019608,blue:1.0,alpha:1.0),ext_pink:(red:0.9764706,green:0.22745098,blue:0.5137255,alpha:1.0),ext_indigo:(red:0.24313726,green:0.53333336,blue:1.0,alpha:1.0),accent_blue:(red:0.3882353,green:0.8156863,blue:0.8745098,alpha:1.0),accent_red:(red:0.99215686,green:0.6313726,blue:0.627451,alpha:1.0),accent_green:(red:0.57254905,green:0.8117647,blue:0.6117647,alpha:1.0),accent_warm_grey:(red:0.7921569,green:0.7294118,blue:0.7058824,alpha:1.0),accent_orange:(red:1.0,green:0.6784314,blue:0.0,alpha:1.0),accent_yellow:(red:0.96862745,green:0.8784314,blue:0.38431373,alpha:1.0),accent_purple:(red:0.90588236,green:0.6117647,blue:0.99607843,alpha:1.0),accent_pink:(red:1.0,green:0.6117647,blue:0.69411767,alpha:1.0),accent_indigo:(red:0.6313726,green:0.7529412,blue:0.92156863,alpha:1.0)) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v1/palette b/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v1/palette index a1f6e506..7de84a03 100644 --- a/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v1/palette +++ b/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v1/palette @@ -1 +1 @@ -Light((name:"cosmic-light",blue:(red:0.0,green:0.28627452,blue:0.42745098,alpha:1.0),red:(red:0.627451,green:0.14509805,blue:0.16862746,alpha:1.0),green:(red:0.23137255,green:0.43137255,blue:0.2627451,alpha:1.0),yellow:(red:0.5882353,green:0.40784314,blue:0.0,alpha:1.0),gray_1:(red:0.8666667,green:0.8666667,blue:0.8666667,alpha:1.0),gray_2:(red:0.9098039,green:0.9098039,blue:0.9098039,alpha:1.0),gray_3:(red:0.9529412,green:0.9529412,blue:0.9529412,alpha:1.0),neutral_0:(red:1.0,green:1.0,blue:1.0,alpha:1.0),neutral_1:(red:0.8862745,green:0.8862745,blue:0.8862745,alpha:1.0),neutral_2:(red:0.7764706,green:0.7764706,blue:0.7764706,alpha:1.0),neutral_3:(red:0.67058825,green:0.67058825,blue:0.67058825,alpha:1.0),neutral_4:(red:0.5686275,green:0.5686275,blue:0.5686275,alpha:1.0),neutral_5:(red:0.46666667,green:0.46666667,blue:0.46666667,alpha:1.0),neutral_6:(red:0.36862746,green:0.36862746,blue:0.36862746,alpha:1.0),neutral_7:(red:0.2784314,green:0.2784314,blue:0.2784314,alpha:1.0),neutral_8:(red:0.1882353,green:0.1882353,blue:0.1882353,alpha:1.0),neutral_9:(red:0.105882354,green:0.105882354,blue:0.105882354,alpha:1.0),neutral_10:(red:0.0,green:0.0,blue:0.0,alpha:1.0),ext_warm_grey:(red:0.60784316,green:0.5568628,blue:0.5411765,alpha:1.0),ext_orange:(red:0.9843137,green:0.72156864,blue:0.42352942,alpha:1.0),ext_yellow:(red:0.96862745,green:0.8784314,blue:0.38431373,alpha:1.0),ext_blue:(red:0.41568628,green:0.7921569,blue:0.84705883,alpha:1.0),ext_purple:(red:0.8352941,green:0.54901963,blue:1.0,alpha:1.0),ext_pink:(red:1.0,green:0.6117647,blue:0.8666667,alpha:1.0),ext_indigo:(red:0.58431375,green:0.76862746,blue:0.9882353,alpha:1.0),accent_warm_grey:(red:0.6784314,green:0.63529414,blue:0.61960787,alpha:1.0),accent_orange:(red:1.0,green:0.84313726,blue:0.6313726,alpha:1.0),accent_yellow:(red:1.0,green:0.94509804,blue:0.61960787,alpha:1.0),accent_purple:(red:0.8352941,green:0.54901963,blue:1.0,alpha:1.0),accent_pink:(red:1.0,green:0.6117647,blue:0.8666667,alpha:1.0),accent_indigo:(red:0.58431375,green:0.76862746,blue:0.9882353,alpha:1.0))) \ No newline at end of file +Light((name:"cosmic-light",blue:(red:0.0,green:0.28627452,blue:0.42745098,alpha:1.0),red:(red:0.627451,green:0.14509805,blue:0.16862746,alpha:1.0),green:(red:0.23137255,green:0.43137255,blue:0.2627451,alpha:1.0),yellow:(red:0.5882353,green:0.40784314,blue:0.0,alpha:1.0),gray_1:(red:0.8666667,green:0.8666667,blue:0.8666667,alpha:1.0),gray_2:(red:0.9098039,green:0.9098039,blue:0.9098039,alpha:1.0),gray_3:(red:0.9529412,green:0.9529412,blue:0.9529412,alpha:1.0),neutral_0:(red:1.0,green:1.0,blue:1.0,alpha:1.0),neutral_1:(red:0.8862745,green:0.8862745,blue:0.8862745,alpha:1.0),neutral_2:(red:0.7764706,green:0.7764706,blue:0.7764706,alpha:1.0),neutral_3:(red:0.67058825,green:0.67058825,blue:0.67058825,alpha:1.0),neutral_4:(red:0.5686275,green:0.5686275,blue:0.5686275,alpha:1.0),neutral_5:(red:0.46666667,green:0.46666667,blue:0.46666667,alpha:1.0),neutral_6:(red:0.36862746,green:0.36862746,blue:0.36862746,alpha:1.0),neutral_7:(red:0.2784314,green:0.2784314,blue:0.2784314,alpha:1.0),neutral_8:(red:0.1882353,green:0.1882353,blue:0.1882353,alpha:1.0),neutral_9:(red:0.105882354,green:0.105882354,blue:0.105882354,alpha:1.0),neutral_10:(red:0.0,green:0.0,blue:0.0,alpha:1.0),bright_green:(red:0.0,green:0.34117648,blue:0.17254902,alpha:1.0),bright_red:(red:0.5372549,green:0.015686275,blue:0.09411765,alpha:1.0),bright_orange:(red:0.4745098,green:0.17254902,blue:0.0,alpha:1.0),ext_warm_grey:(red:0.60784316,green:0.5568628,blue:0.5411765,alpha:1.0),ext_orange:(red:0.9843137,green:0.72156864,blue:0.42352942,alpha:1.0),ext_yellow:(red:0.96862745,green:0.8784314,blue:0.38431373,alpha:1.0),ext_blue:(red:0.41568628,green:0.7921569,blue:0.84705883,alpha:1.0),ext_purple:(red:0.8352941,green:0.54901963,blue:1.0,alpha:1.0),ext_pink:(red:1.0,green:0.6117647,blue:0.8666667,alpha:1.0),ext_indigo:(red:0.58431375,green:0.76862746,blue:0.9882353,alpha:1.0),accent_blue:(red:0.0,green:0.32156864,blue:0.3529412,alpha:1.0),accent_red:(red:0.47058824,green:0.16078432,blue:0.18039216,alpha:1.0),accent_green:(red:0.09411765,green:0.33333334,blue:0.16078432,alpha:1.0),accent_warm_grey:(red:0.33333334,green:0.2784314,blue:0.25882354,alpha:1.0),accent_orange:(red:0.38431373,green:0.2509804,blue:0.0,alpha:1.0),accent_yellow:(red:0.3254902,green:0.28235295,blue:0.0,alpha:1.0),accent_purple:(red:0.40784314,green:0.12941177,blue:0.4862745,alpha:1.0),accent_pink:(red:0.5254902,green:0.015686275,blue:0.22745098,alpha:1.0),accent_indigo:(red:0.18039216,green:0.28627452,blue:0.42745098,alpha:1.0))) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light/v1/palette b/resources/default_schema/com.system76.CosmicTheme.Light/v1/palette index 78b85662..2888228f 100644 --- a/resources/default_schema/com.system76.CosmicTheme.Light/v1/palette +++ b/resources/default_schema/com.system76.CosmicTheme.Light/v1/palette @@ -1 +1 @@ -(name:"cosmic-light",blue:(red:0.0,green:0.28627452,blue:0.42745098,alpha:1.0),red:(red:0.627451,green:0.14509805,blue:0.16862746,alpha:1.0),green:(red:0.23137255,green:0.43137255,blue:0.2627451,alpha:1.0),yellow:(red:0.5882353,green:0.40784314,blue:0.0,alpha:1.0),gray_1:(red:0.8666667,green:0.8666667,blue:0.8666667,alpha:1.0),gray_2:(red:0.9098039,green:0.9098039,blue:0.9098039,alpha:1.0),gray_3:(red:0.9529412,green:0.9529412,blue:0.9529412,alpha:1.0),neutral_0:(red:1.0,green:1.0,blue:1.0,alpha:1.0),neutral_1:(red:0.8862745,green:0.8862745,blue:0.8862745,alpha:1.0),neutral_2:(red:0.7764706,green:0.7764706,blue:0.7764706,alpha:1.0),neutral_3:(red:0.67058825,green:0.67058825,blue:0.67058825,alpha:1.0),neutral_4:(red:0.5686275,green:0.5686275,blue:0.5686275,alpha:1.0),neutral_5:(red:0.46666667,green:0.46666667,blue:0.46666667,alpha:1.0),neutral_6:(red:0.36862746,green:0.36862746,blue:0.36862746,alpha:1.0),neutral_7:(red:0.2784314,green:0.2784314,blue:0.2784314,alpha:1.0),neutral_8:(red:0.1882353,green:0.1882353,blue:0.1882353,alpha:1.0),neutral_9:(red:0.105882354,green:0.105882354,blue:0.105882354,alpha:1.0),neutral_10:(red:0.0,green:0.0,blue:0.0,alpha:1.0),ext_warm_grey:(red:0.60784316,green:0.5568628,blue:0.5411765,alpha:1.0),ext_orange:(red:0.9843137,green:0.72156864,blue:0.42352942,alpha:1.0),ext_yellow:(red:0.96862745,green:0.8784314,blue:0.38431373,alpha:1.0),ext_blue:(red:0.41568628,green:0.7921569,blue:0.84705883,alpha:1.0),ext_purple:(red:0.8352941,green:0.54901963,blue:1.0,alpha:1.0),ext_pink:(red:1.0,green:0.6117647,blue:0.8666667,alpha:1.0),ext_indigo:(red:0.58431375,green:0.76862746,blue:0.9882353,alpha:1.0),accent_warm_grey:(red:0.6784314,green:0.63529414,blue:0.61960787,alpha:1.0),accent_orange:(red:1.0,green:0.84313726,blue:0.6313726,alpha:1.0),accent_yellow:(red:1.0,green:0.94509804,blue:0.61960787,alpha:1.0),accent_purple:(red:0.8352941,green:0.54901963,blue:1.0,alpha:1.0),accent_pink:(red:1.0,green:0.6117647,blue:0.8666667,alpha:1.0),accent_indigo:(red:0.58431375,green:0.76862746,blue:0.9882353,alpha:1.0)) \ No newline at end of file +(name:"cosmic-light",blue:(red:0.0,green:0.28627452,blue:0.42745098,alpha:1.0),red:(red:0.627451,green:0.14509805,blue:0.16862746,alpha:1.0),green:(red:0.23137255,green:0.43137255,blue:0.2627451,alpha:1.0),yellow:(red:0.5882353,green:0.40784314,blue:0.0,alpha:1.0),gray_1:(red:0.8666667,green:0.8666667,blue:0.8666667,alpha:1.0),gray_2:(red:0.9098039,green:0.9098039,blue:0.9098039,alpha:1.0),gray_3:(red:0.9529412,green:0.9529412,blue:0.9529412,alpha:1.0),neutral_0:(red:1.0,green:1.0,blue:1.0,alpha:1.0),neutral_1:(red:0.8862745,green:0.8862745,blue:0.8862745,alpha:1.0),neutral_2:(red:0.7764706,green:0.7764706,blue:0.7764706,alpha:1.0),neutral_3:(red:0.67058825,green:0.67058825,blue:0.67058825,alpha:1.0),neutral_4:(red:0.5686275,green:0.5686275,blue:0.5686275,alpha:1.0),neutral_5:(red:0.46666667,green:0.46666667,blue:0.46666667,alpha:1.0),neutral_6:(red:0.36862746,green:0.36862746,blue:0.36862746,alpha:1.0),neutral_7:(red:0.2784314,green:0.2784314,blue:0.2784314,alpha:1.0),neutral_8:(red:0.1882353,green:0.1882353,blue:0.1882353,alpha:1.0),neutral_9:(red:0.105882354,green:0.105882354,blue:0.105882354,alpha:1.0),neutral_10:(red:0.0,green:0.0,blue:0.0,alpha:1.0),bright_green:(red:0.0,green:0.34117648,blue:0.17254902,alpha:1.0),bright_red:(red:0.5372549,green:0.015686275,blue:0.09411765,alpha:1.0),bright_orange:(red:0.4745098,green:0.17254902,blue:0.0,alpha:1.0),ext_warm_grey:(red:0.60784316,green:0.5568628,blue:0.5411765,alpha:1.0),ext_orange:(red:0.9843137,green:0.72156864,blue:0.42352942,alpha:1.0),ext_yellow:(red:0.96862745,green:0.8784314,blue:0.38431373,alpha:1.0),ext_blue:(red:0.41568628,green:0.7921569,blue:0.84705883,alpha:1.0),ext_purple:(red:0.8352941,green:0.54901963,blue:1.0,alpha:1.0),ext_pink:(red:1.0,green:0.6117647,blue:0.8666667,alpha:1.0),ext_indigo:(red:0.58431375,green:0.76862746,blue:0.9882353,alpha:1.0),accent_blue:(red:0.0,green:0.32156864,blue:0.3529412,alpha:1.0),accent_red:(red:0.47058824,green:0.16078432,blue:0.18039216,alpha:1.0),accent_green:(red:0.09411765,green:0.33333334,blue:0.16078432,alpha:1.0),accent_warm_grey:(red:0.33333334,green:0.2784314,blue:0.25882354,alpha:1.0),accent_orange:(red:0.38431373,green:0.2509804,blue:0.0,alpha:1.0),accent_yellow:(red:0.3254902,green:0.28235295,blue:0.0,alpha:1.0),accent_purple:(red:0.40784314,green:0.12941177,blue:0.4862745,alpha:1.0),accent_pink:(red:0.5254902,green:0.015686275,blue:0.22745098,alpha:1.0),accent_indigo:(red:0.18039216,green:0.28627452,blue:0.42745098,alpha:1.0)) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Mode/v1/is_dark b/resources/default_schema/com.system76.CosmicTheme.Mode/v1/is_dark index 27ba77dd..f32a5804 100644 --- a/resources/default_schema/com.system76.CosmicTheme.Mode/v1/is_dark +++ b/resources/default_schema/com.system76.CosmicTheme.Mode/v1/is_dark @@ -1 +1 @@ -true +true \ No newline at end of file From 99aadabb7a0c7f12aa8736172358859aceb8a464 Mon Sep 17 00:00:00 2001 From: Ashley Wulber Date: Thu, 5 Oct 2023 18:12:41 -0400 Subject: [PATCH 10/27] use git deps --- Cargo.lock | 155 +++++++++++++++++++++++++++++------------------------ Cargo.toml | 11 ++-- 2 files changed, 93 insertions(+), 73 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4f9e7212..39334d1e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -280,7 +280,7 @@ checksum = "5fd55a5ba1179988837d24ab4c7cc8ed6efdeff578ede0416b4225a5fca35bd0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -297,7 +297,7 @@ checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -470,7 +470,7 @@ checksum = "965ab7eb5f8f97d2a083c799f3a1b994fc397b2fe2da5d1da1626ce15a39f2b1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -518,7 +518,7 @@ dependencies = [ "bitflags 2.4.0", "log", "polling 3.2.0", - "rustix 0.38.15", + "rustix 0.38.17", "slab", "thiserror", ] @@ -530,7 +530,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0f0ea9b9476c7fad82841a8dbb380e2eae480c21910feba80725b46931ed8f02" dependencies = [ "calloop 0.12.2", - "rustix 0.38.15", + "rustix 0.38.17", "wayland-backend 0.3.2", "wayland-client 0.31.1", ] @@ -807,7 +807,7 @@ dependencies = [ [[package]] name = "cosmic-comp-config" version = "0.1.0" -source = "git+https://github.com/pop-os/cosmic-comp#d051f41de6d2daf1f0c5fa3d70d16d8b1b13b64b" +source = "git+https://github.com/pop-os/cosmic-comp#e1e5dd994aaa0c415e8fc797ad53066a504f774a" dependencies = [ "input", "serde", @@ -816,6 +816,7 @@ dependencies = [ [[package]] name = "cosmic-config" version = "0.1.0" +source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#f6a010785f6a4bf6f42c33ecc37aa3c8e5713712" dependencies = [ "atomicwrites", "calloop 0.12.2", @@ -830,6 +831,7 @@ dependencies = [ [[package]] name = "cosmic-config-derive" version = "0.1.0" +source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#f6a010785f6a4bf6f42c33ecc37aa3c8e5713712" dependencies = [ "quote", "syn 1.0.109", @@ -963,6 +965,7 @@ dependencies = [ [[package]] name = "cosmic-theme" version = "0.1.0" +source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#f6a010785f6a4bf6f42c33ecc37aa3c8e5713712" dependencies = [ "almost", "cosmic-config", @@ -1157,7 +1160,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -1179,7 +1182,7 @@ checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" dependencies = [ "darling_core 0.20.3", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -1221,7 +1224,7 @@ dependencies = [ "darling 0.20.3", "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -1298,7 +1301,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -1371,7 +1374,7 @@ checksum = "f95e2801cd355d4a1a3e3953ce6ee5ae9603a5c833455343a8bfe3f44d418246" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -1677,7 +1680,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -1840,7 +1843,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -2137,7 +2140,7 @@ dependencies = [ "serde", "serde_derive", "thiserror", - "toml 0.8.1", + "toml 0.8.2", "unic-langid", ] @@ -2180,7 +2183,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.37", + "syn 2.0.38", "unic-langid", ] @@ -2194,12 +2197,13 @@ dependencies = [ "i18n-config", "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] name = "iced" version = "0.10.0" +source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#f6a010785f6a4bf6f42c33ecc37aa3c8e5713712" dependencies = [ "iced_accessibility", "iced_core", @@ -2215,6 +2219,7 @@ dependencies = [ [[package]] name = "iced_accessibility" version = "0.1.0" +source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#f6a010785f6a4bf6f42c33ecc37aa3c8e5713712" dependencies = [ "accesskit", "accesskit_unix", @@ -2223,6 +2228,7 @@ dependencies = [ [[package]] name = "iced_core" version = "0.10.0" +source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#f6a010785f6a4bf6f42c33ecc37aa3c8e5713712" dependencies = [ "bitflags 1.3.2", "iced_accessibility", @@ -2237,6 +2243,7 @@ dependencies = [ [[package]] name = "iced_futures" version = "0.7.0" +source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#f6a010785f6a4bf6f42c33ecc37aa3c8e5713712" dependencies = [ "futures", "iced_core", @@ -2249,6 +2256,7 @@ dependencies = [ [[package]] name = "iced_graphics" version = "0.9.0" +source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#f6a010785f6a4bf6f42c33ecc37aa3c8e5713712" dependencies = [ "bitflags 1.3.2", "bytemuck", @@ -2266,6 +2274,7 @@ dependencies = [ [[package]] name = "iced_renderer" version = "0.1.0" +source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#f6a010785f6a4bf6f42c33ecc37aa3c8e5713712" dependencies = [ "iced_graphics", "iced_tiny_skia", @@ -2278,6 +2287,7 @@ dependencies = [ [[package]] name = "iced_runtime" version = "0.1.1" +source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#f6a010785f6a4bf6f42c33ecc37aa3c8e5713712" dependencies = [ "iced_accessibility", "iced_core", @@ -2289,6 +2299,7 @@ dependencies = [ [[package]] name = "iced_sctk" version = "0.1.0" +source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#f6a010785f6a4bf6f42c33ecc37aa3c8e5713712" dependencies = [ "enum-repr", "float-cmp", @@ -2312,6 +2323,7 @@ dependencies = [ [[package]] name = "iced_style" version = "0.9.0" +source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#f6a010785f6a4bf6f42c33ecc37aa3c8e5713712" dependencies = [ "iced_core", "once_cell", @@ -2321,6 +2333,7 @@ dependencies = [ [[package]] name = "iced_tiny_skia" version = "0.1.0" +source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#f6a010785f6a4bf6f42c33ecc37aa3c8e5713712" dependencies = [ "bytemuck", "cosmic-text", @@ -2338,6 +2351,7 @@ dependencies = [ [[package]] name = "iced_wgpu" version = "0.11.1" +source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#f6a010785f6a4bf6f42c33ecc37aa3c8e5713712" dependencies = [ "bitflags 1.3.2", "bytemuck", @@ -2359,6 +2373,7 @@ dependencies = [ [[package]] name = "iced_widget" version = "0.1.3" +source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#f6a010785f6a4bf6f42c33ecc37aa3c8e5713712" dependencies = [ "iced_renderer", "iced_runtime", @@ -2373,6 +2388,7 @@ dependencies = [ [[package]] name = "iced_winit" version = "0.10.0" +source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#f6a010785f6a4bf6f42c33ecc37aa3c8e5713712" dependencies = [ "iced_graphics", "iced_runtime", @@ -2388,9 +2404,9 @@ dependencies = [ [[package]] name = "icu_calendar" -version = "1.3.1" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff0efcbeb549a74ade74c9e385e59568272dc840ec68b2eb772708de16b77c6b" +checksum = "b520c5675775e3838447c33fc55bf558148c6824ef0d20ff7a9e0df7345a281c" dependencies = [ "calendrical_calculations", "displaydoc", @@ -2405,15 +2421,15 @@ dependencies = [ [[package]] name = "icu_calendar_data" -version = "1.3.0" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf910a18bc3665153db121163ffe3fac18add670c778a4c485e50140ef198b61" +checksum = "75d8d1a514ca7e6dc547be930f2fd661d578909c07cf1c1adade81c3f7a78840" [[package]] name = "icu_locid" -version = "1.3.0" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56b72c6de0121c00da9828eb3e2603041d563788289bb15feba7c3331de71b5f" +checksum = "f284eb342dc49d3e9d9f3b188489d76b5d22dfb1d1a5e0d1941811253bac625c" dependencies = [ "displaydoc", "litemap", @@ -2424,9 +2440,9 @@ dependencies = [ [[package]] name = "icu_locid_transform" -version = "1.3.1" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b10b2a476daefcfe19707e095f5fdc1f446870a56e250250ae64782016bcf9" +checksum = "6551daf80882d8e68eee186cc19e132d8bde1b1f059a79b93384a5ca0e8fc5e7" dependencies = [ "displaydoc", "icu_locid", @@ -2438,15 +2454,15 @@ dependencies = [ [[package]] name = "icu_locid_transform_data" -version = "1.3.0" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce5d8151979828a4645be945302e05c903cbb5c4a86a936965f7605bd5142e06" +checksum = "2a741eba5431f75eb2f1f9022d3cffabcadda6771e54fb4e77c8ba8653e4da44" [[package]] name = "icu_provider" -version = "1.3.1" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18d505243d809d5e14491a29ab9842f8a4b0568a33b462251f8ebf971ba55c83" +checksum = "68acdef80034b5e35d8524e9817479d389a4f9774f3f0cbe1bf3884d80fd5934" dependencies = [ "displaydoc", "icu_locid", @@ -2461,20 +2477,20 @@ dependencies = [ [[package]] name = "icu_provider_macros" -version = "1.3.0" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca9be8af0b117ccf1516251daab4c9137c012646a211c2a02d2f568ea3cd0df4" +checksum = "2060258edfcfe32ca7058849bf0f146cb5c59aadbedf480333c0d0002f97bc99" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] name = "icu_timezone" -version = "1.3.0" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d411c1ab1c6062291de1f347d46eca742dd945ee21e0f012e22f27b273b38659" +checksum = "19e6401cd210ccda98b2e7fc707831b29c6efe319efbbec460f957b6f331f626" dependencies = [ "displaydoc", "icu_calendar", @@ -2488,9 +2504,9 @@ dependencies = [ [[package]] name = "icu_timezone_data" -version = "1.3.0" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9628d42fbde50f50ec8ee704c7cba46279734b46f1f4c352b6d5c5d4a9165008" +checksum = "6d7e214a653bac59b768c42f82d252f13af95e8a9cb07b6108b8bc723c561b43" [[package]] name = "ident_case" @@ -2651,7 +2667,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ "hermit-abi", - "rustix 0.38.15", + "rustix 0.38.17", "windows-sys 0.48.0", ] @@ -2767,6 +2783,7 @@ checksum = "9cdc71e17332e86d2e1d38c1f99edcb6288ee11b815fb1a4b049eaa2114d369b" [[package]] name = "libcosmic" version = "0.1.0" +source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#f6a010785f6a4bf6f42c33ecc37aa3c8e5713712" dependencies = [ "apply", "ashpd", @@ -3453,7 +3470,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -3489,7 +3506,7 @@ checksum = "b7db010ec5ff3d4385e4f133916faacd9dad0f6a09394c92d825b3aed310fa0a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -3582,7 +3599,7 @@ dependencies = [ "phf_shared", "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -3617,7 +3634,7 @@ checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -3687,7 +3704,7 @@ dependencies = [ "cfg-if", "concurrent-queue", "pin-project-lite", - "rustix 0.38.15", + "rustix 0.38.17", "tracing", "windows-sys 0.48.0", ] @@ -3997,7 +4014,7 @@ dependencies = [ "proc-macro2", "quote", "rust-embed-utils", - "syn 2.0.37", + "syn 2.0.38", "walkdir", ] @@ -4049,9 +4066,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.15" +version = "0.38.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2f9da0cbd88f9f09e7814e388301c8414c51c62aa6ce1e4b5c551d49d96e531" +checksum = "f25469e9ae0f3d0047ca8b93fc56843f38e6774f0914a107ff8b41be8be8e0b7" dependencies = [ "bitflags 2.4.0", "errno", @@ -4164,7 +4181,7 @@ checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -4175,7 +4192,7 @@ checksum = "8725e1dfadb3a50f7e5ce0b1a540466f6ed3fe7a0fca2ac2b8b831d31316bd00" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -4232,9 +4249,9 @@ dependencies = [ [[package]] name = "sharded-slab" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1b21f559e07218024e7e9f90f96f601825397de0e25420135f7f952453fed0b" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" dependencies = [ "lazy_static", ] @@ -4497,9 +4514,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.37" +version = "2.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7303ef2c05cd654186cb250d29049a24840ca25d2747c25c0381c8d9e2f582e8" +checksum = "e96b79aaa137db8f61e26363a0c9b47d8b4ec75da28b7d1d614c2303e232408b" dependencies = [ "proc-macro2", "quote", @@ -4514,7 +4531,7 @@ checksum = "285ba80e733fac80aa4270fbcdf83772a79b80aa35c97075320abfee4a915b06" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", "unicode-xid", ] @@ -4545,7 +4562,7 @@ dependencies = [ [[package]] name = "taffy" version = "0.3.11" -source = "git+https://github.com/DioxusLabs/taffy#120bb7a2e501822b324fd48de955450ebbba1c1a" +source = "git+https://github.com/DioxusLabs/taffy#48e4800f14c6af5cd26275fb570d11b93e279654" dependencies = [ "arrayvec 0.7.4", "grid", @@ -4568,7 +4585,7 @@ dependencies = [ "cfg-if", "fastrand 2.0.1", "redox_syscall 0.3.5", - "rustix 0.38.15", + "rustix 0.38.17", "windows-sys 0.48.0", ] @@ -4598,7 +4615,7 @@ checksum = "10712f02019e9288794769fba95cd6847df9874d49d871d062172f9dd41bc4cc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -4684,9 +4701,9 @@ dependencies = [ [[package]] name = "tinystr" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b07bb54ef1f8ff27564b08b861144d3b8d40263efe07684f64987f4c0d044e3e" +checksum = "d5d0e245e80bdc9b4e5356fc45a72184abbc3861992603f515270e9340f5a219" dependencies = [ "displaydoc", "zerovec", @@ -4736,14 +4753,14 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bc1433177506450fe920e46a4f9812d0c211f5dd556da10e731a0a3dfa151f0" +checksum = "185d8ab0dfbb35cf1399a6344d8484209c088f75f8f68230da55d48d95d43e3d" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.20.1", + "toml_edit 0.20.2", ] [[package]] @@ -4768,9 +4785,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.20.1" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca676d9ba1a322c1b64eb8045a5ec5c0cfb0c9d08e15e9ff622589ad5221c8fe" +checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" dependencies = [ "indexmap 2.0.2", "serde", @@ -4799,7 +4816,7 @@ checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -5140,7 +5157,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", "wasm-bindgen-shared", ] @@ -5174,7 +5191,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -6035,7 +6052,7 @@ checksum = "d5e19fb6ed40002bab5403ffa37e53e0e56f914a4450c8765f533018db1db35f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", "synstructure", ] @@ -6129,15 +6146,15 @@ checksum = "e6a647510471d372f2e6c2e6b7219e44d8c574d24fdc11c610a61455782f18c3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", "synstructure", ] [[package]] name = "zerotrie" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41354ddf8b8303c6e1274c5f2ed4bd7ad401db10634e50bd7303ae0fd84b2bd8" +checksum = "9685bb4deb98dab812e87c296a9631fc00d7ca4bc5c2c5f304f375bbed711a8a" dependencies = [ "displaydoc", "yoke", @@ -6163,7 +6180,7 @@ checksum = "acabf549809064225ff8878baedc4ce3732ac3b07e7c7ce6e5c2ccdbc485c324" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index d80d9d7c..9fc3ccb4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,9 +7,12 @@ git = "https://github.com/pop-os/libcosmic" [workspace.dependencies.libcosmic] git = "https://github.com/pop-os/libcosmic" +branch = "theme-dark-light-switching" +# git = "https://github.com/pop-os/libcosmic" features = ["debug", "wayland", "tokio"] [workspace.dependencies.cosmic-config] +branch = "theme-dark-light-switching" git = "https://github.com/pop-os/libcosmic" [workspace.dependencies.cosmic-bg-config] @@ -23,10 +26,10 @@ git = "https://github.com/pop-os/cosmic-comp" git = "https://github.com/pop-os/cosmic-panel" [patch."https://github.com/pop-os/libcosmic"] -libcosmic = { path = "../libcosmic" } -cosmic-config = { path = "../libcosmic/cosmic-config" } -# libcosmic = { git = "https://github.com/pop-os/libcosmic?rev=master", branch = "improv" } -# cosmic-config = { git = "https://github.com/pop-os/libcosmic?rev=master", branch = "improv" } +# libcosmic = { path = "../libcosmic" } +# cosmic-config = { path = "../libcosmic/cosmic-config" } +libcosmic = { git = "https://github.com/pop-os/libcosmic//", branch = "theme-dark-light-switching" } +cosmic-config = { git = "https://github.com/pop-os/libcosmic//", branch = "theme-dark-light-switching" } [patch."https://github.com/Smithay/client-toolkit"] sctk = { git = "https://github.com/smithay/client-toolkit//", package = "smithay-client-toolkit", rev = "dc8c4a0"} From 7b7278a7038cb76bcc79d3cc8f3b5b0e09f6964b Mon Sep 17 00:00:00 2001 From: Ashley Wulber Date: Fri, 6 Oct 2023 11:46:58 -0400 Subject: [PATCH 11/27] clippy and cleanup --- app/src/app.rs | 4 +- app/src/main.rs | 5 +-- app/src/pages/desktop/appearance.rs | 40 ++++++++++---------- app/src/pages/desktop/panel/applets_inner.rs | 2 +- app/src/pages/desktop/panel/inner.rs | 2 +- app/src/widget/mod.rs | 1 - 6 files changed, 24 insertions(+), 30 deletions(-) diff --git a/app/src/app.rs b/app/src/app.rs index 2dbdcbf9..6c6f6fc6 100644 --- a/app/src/app.rs +++ b/app/src/app.rs @@ -281,7 +281,7 @@ impl cosmic::Application for SettingsApp { self.pages, dock::applets::Message(applets_inner::Message::PanelConfig(config,)), dock::applets::Page - ); + ) } Message::DesktopInfo => { @@ -291,7 +291,7 @@ impl cosmic::Application for SettingsApp { .filter_map(|p| applets_inner::Applet::try_from(Cow::from(p)).ok()) .collect(); - page::update!( + _ = page::update!( self.pages, dock::applets::Message(applets_inner::Message::Applets(info_list.clone())), dock::applets::Page diff --git a/app/src/main.rs b/app/src/main.rs index 430e682e..e4ba32ce 100644 --- a/app/src/main.rs +++ b/app/src/main.rs @@ -18,10 +18,7 @@ pub mod widget; pub mod subscription; -use cosmic::{ - iced::{wayland::actions::window::SctkWindowSettings, Limits}, - iced_sctk::settings::InitialSurface, -}; +use cosmic::iced::Limits; use i18n_embed::DesktopLanguageRequester; use tracing_subscriber::prelude::*; diff --git a/app/src/pages/desktop/appearance.rs b/app/src/pages/desktop/appearance.rs index 3af10e78..82d313ce 100644 --- a/app/src/pages/desktop/appearance.rs +++ b/app/src/pages/desktop/appearance.rs @@ -85,9 +85,15 @@ impl From<(Option, ThemeMode)> for Page { ThemeBuilder::light_config() } .ok(); - let theme_builder = theme_builder_config - .as_ref() - .map(|c| match ThemeBuilder::get_entry(c) { + let theme_builder = theme_builder_config.as_ref().map_or_else( + || { + if theme_mode.is_dark { + ThemeBuilder::dark() + } else { + ThemeBuilder::light() + } + }, + |c| match ThemeBuilder::get_entry(c) { Ok(t) => t, Err((errors, t)) => { for e in errors { @@ -95,14 +101,8 @@ impl From<(Option, ThemeMode)> for Page { } t } - }) - .unwrap_or_else(|| { - if theme_mode.is_dark { - ThemeBuilder::dark() - } else { - ThemeBuilder::light() - } - }); + }, + ); // TODO fill all these values with the current values Self { accent_window_hint: Default::default(), @@ -214,9 +214,9 @@ impl From for CornerRadii { impl From for Roundness { fn from(value: CornerRadii) -> Self { - if value.radius_m[0] == 16.0 { + if (value.radius_m[0] - 16.0).abs() < 0.01 { Self::Round - } else if value.radius_m[0] == 8.0 { + } else if (value.radius_m[0] - 8.0).abs() < 0.01 { Self::SlightlyRound } else { Self::Square @@ -540,7 +540,7 @@ impl Page { theme_builder.build(), ))) }), - ]) + ]); } // TODO if there were some changes, rebuild and apply to the config @@ -653,7 +653,7 @@ pub fn mode_and_colors() -> Section { let cur_accent = page .theme_builder .accent - .map(|a| Srgba::from(a)) + .map(Srgba::from) .unwrap_or(palette.accent_blue); settings::view_section(§ion.title) .add( @@ -985,12 +985,10 @@ fn color_button<'a, Message: 'a>( color: cosmic::iced::Color, selected: bool, ) -> cosmic::widget::Button<'a, Message, cosmic::Renderer> { - let ret = button(cosmic::widget::vertical_space(Length::Fixed(f32::from( - 48.0, - )))) - .width(Length::Fixed(f32::from(48.0))) - .height(Length::Fixed(f32::from(48.0))) - .on_press_maybe(on_press); + let ret = button(cosmic::widget::vertical_space(Length::Fixed(48.0))) + .width(Length::Fixed(48.0)) + .height(Length::Fixed(48.0)) + .on_press_maybe(on_press); style_color_button(ret, color, selected) } diff --git a/app/src/pages/desktop/panel/applets_inner.rs b/app/src/pages/desktop/panel/applets_inner.rs index 18917176..bf0d5cf3 100644 --- a/app/src/pages/desktop/panel/applets_inner.rs +++ b/app/src/pages/desktop/panel/applets_inner.rs @@ -1,6 +1,6 @@ use button::StyleSheet as ButtonStyleSheet; use cosmic::iced_style::container::StyleSheet; -use cosmic::iced_widget::text_input::{Icon, Side}; + use cosmic::widget::{ button, column, container, header_bar, icon, list_column, row, scrollable, text, text_input, Column, diff --git a/app/src/pages/desktop/panel/inner.rs b/app/src/pages/desktop/panel/inner.rs index 112499ea..55704c05 100644 --- a/app/src/pages/desktop/panel/inner.rs +++ b/app/src/pages/desktop/panel/inner.rs @@ -247,7 +247,7 @@ pub(crate) fn add_panel< fl!("panel-missing", "desc"), fl!("panel-missing", "fix"), ]) - .view::

(move |_binder, page, section| { + .view::

(move |_binder, _page, section| { // _descriptions = §ion.descriptions; settings::view_section(§ion.title) .apply(Element::from) diff --git a/app/src/widget/mod.rs b/app/src/widget/mod.rs index 55f11fd8..6cd8b63e 100644 --- a/app/src/widget/mod.rs +++ b/app/src/widget/mod.rs @@ -42,7 +42,6 @@ pub fn search_header( column::with_children(column_children).into() } -#[must_use] pub fn search_page_link(title: &str) -> button::TextButton { button::text(title).style(button::Style::Link) } From af7ffe8018db13414de4792e32b69a0fc9b1abc1 Mon Sep 17 00:00:00 2001 From: Ashley Wulber Date: Tue, 10 Oct 2023 13:53:51 -0400 Subject: [PATCH 12/27] update libcosmic & fix illustration names --- Cargo.lock | 19 +------------------ Cargo.toml | 8 ++++---- ...lustration-appearance-dark-style-round.svg | 14 +++++++------- ...n-appearance-dark-style-slightly-round.svg | 14 +++++++------- ...ustration-appearance-dark-style-square.svg | 14 +++++++------- ...ustration-appearance-light-style-round.svg | 14 +++++++------- ...-appearance-light-style-slightly-round.svg | 14 +++++++------- ...stration-appearance-light-style-square.svg | 14 +++++++------- 8 files changed, 47 insertions(+), 64 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 39334d1e..8adc8c9e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -816,7 +816,6 @@ dependencies = [ [[package]] name = "cosmic-config" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#f6a010785f6a4bf6f42c33ecc37aa3c8e5713712" dependencies = [ "atomicwrites", "calloop 0.12.2", @@ -831,7 +830,6 @@ dependencies = [ [[package]] name = "cosmic-config-derive" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#f6a010785f6a4bf6f42c33ecc37aa3c8e5713712" dependencies = [ "quote", "syn 1.0.109", @@ -965,7 +963,6 @@ dependencies = [ [[package]] name = "cosmic-theme" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#f6a010785f6a4bf6f42c33ecc37aa3c8e5713712" dependencies = [ "almost", "cosmic-config", @@ -2203,7 +2200,6 @@ dependencies = [ [[package]] name = "iced" version = "0.10.0" -source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#f6a010785f6a4bf6f42c33ecc37aa3c8e5713712" dependencies = [ "iced_accessibility", "iced_core", @@ -2219,7 +2215,6 @@ dependencies = [ [[package]] name = "iced_accessibility" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#f6a010785f6a4bf6f42c33ecc37aa3c8e5713712" dependencies = [ "accesskit", "accesskit_unix", @@ -2228,7 +2223,6 @@ dependencies = [ [[package]] name = "iced_core" version = "0.10.0" -source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#f6a010785f6a4bf6f42c33ecc37aa3c8e5713712" dependencies = [ "bitflags 1.3.2", "iced_accessibility", @@ -2243,7 +2237,6 @@ dependencies = [ [[package]] name = "iced_futures" version = "0.7.0" -source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#f6a010785f6a4bf6f42c33ecc37aa3c8e5713712" dependencies = [ "futures", "iced_core", @@ -2256,7 +2249,6 @@ dependencies = [ [[package]] name = "iced_graphics" version = "0.9.0" -source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#f6a010785f6a4bf6f42c33ecc37aa3c8e5713712" dependencies = [ "bitflags 1.3.2", "bytemuck", @@ -2274,7 +2266,6 @@ dependencies = [ [[package]] name = "iced_renderer" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#f6a010785f6a4bf6f42c33ecc37aa3c8e5713712" dependencies = [ "iced_graphics", "iced_tiny_skia", @@ -2287,7 +2278,6 @@ dependencies = [ [[package]] name = "iced_runtime" version = "0.1.1" -source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#f6a010785f6a4bf6f42c33ecc37aa3c8e5713712" dependencies = [ "iced_accessibility", "iced_core", @@ -2299,7 +2289,6 @@ dependencies = [ [[package]] name = "iced_sctk" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#f6a010785f6a4bf6f42c33ecc37aa3c8e5713712" dependencies = [ "enum-repr", "float-cmp", @@ -2323,7 +2312,6 @@ dependencies = [ [[package]] name = "iced_style" version = "0.9.0" -source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#f6a010785f6a4bf6f42c33ecc37aa3c8e5713712" dependencies = [ "iced_core", "once_cell", @@ -2333,7 +2321,6 @@ dependencies = [ [[package]] name = "iced_tiny_skia" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#f6a010785f6a4bf6f42c33ecc37aa3c8e5713712" dependencies = [ "bytemuck", "cosmic-text", @@ -2351,7 +2338,6 @@ dependencies = [ [[package]] name = "iced_wgpu" version = "0.11.1" -source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#f6a010785f6a4bf6f42c33ecc37aa3c8e5713712" dependencies = [ "bitflags 1.3.2", "bytemuck", @@ -2373,7 +2359,6 @@ dependencies = [ [[package]] name = "iced_widget" version = "0.1.3" -source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#f6a010785f6a4bf6f42c33ecc37aa3c8e5713712" dependencies = [ "iced_renderer", "iced_runtime", @@ -2388,7 +2373,6 @@ dependencies = [ [[package]] name = "iced_winit" version = "0.10.0" -source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#f6a010785f6a4bf6f42c33ecc37aa3c8e5713712" dependencies = [ "iced_graphics", "iced_runtime", @@ -2783,7 +2767,6 @@ checksum = "9cdc71e17332e86d2e1d38c1f99edcb6288ee11b815fb1a4b049eaa2114d369b" [[package]] name = "libcosmic" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#f6a010785f6a4bf6f42c33ecc37aa3c8e5713712" dependencies = [ "apply", "ashpd", @@ -4562,7 +4545,7 @@ dependencies = [ [[package]] name = "taffy" version = "0.3.11" -source = "git+https://github.com/DioxusLabs/taffy#48e4800f14c6af5cd26275fb570d11b93e279654" +source = "git+https://github.com/DioxusLabs/taffy?rev=65bedf#65bedf128ec8cef40c1a21b6f141f2c771842cca" dependencies = [ "arrayvec 0.7.4", "grid", diff --git a/Cargo.toml b/Cargo.toml index 9fc3ccb4..8f71c93b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,10 +26,10 @@ git = "https://github.com/pop-os/cosmic-comp" git = "https://github.com/pop-os/cosmic-panel" [patch."https://github.com/pop-os/libcosmic"] -# libcosmic = { path = "../libcosmic" } -# cosmic-config = { path = "../libcosmic/cosmic-config" } -libcosmic = { git = "https://github.com/pop-os/libcosmic//", branch = "theme-dark-light-switching" } -cosmic-config = { git = "https://github.com/pop-os/libcosmic//", branch = "theme-dark-light-switching" } +libcosmic = { path = "../libcosmic" } +cosmic-config = { path = "../libcosmic/cosmic-config" } +# libcosmic = { git = "https://github.com/pop-os/libcosmic//", branch = "theme-dark-light-switching" } +# cosmic-config = { git = "https://github.com/pop-os/libcosmic//", branch = "theme-dark-light-switching" } [patch."https://github.com/Smithay/client-toolkit"] sctk = { git = "https://github.com/smithay/client-toolkit//", package = "smithay-client-toolkit", rev = "dc8c4a0"} diff --git a/resources/icons/scalable/status/illustration-appearance-dark-style-round.svg b/resources/icons/scalable/status/illustration-appearance-dark-style-round.svg index aa89c94b..5f2313b7 100644 --- a/resources/icons/scalable/status/illustration-appearance-dark-style-round.svg +++ b/resources/icons/scalable/status/illustration-appearance-dark-style-round.svg @@ -1,9 +1,9 @@ - - - - - - - + + + + + + + diff --git a/resources/icons/scalable/status/illustration-appearance-dark-style-slightly-round.svg b/resources/icons/scalable/status/illustration-appearance-dark-style-slightly-round.svg index 7a49c389..445c02d6 100644 --- a/resources/icons/scalable/status/illustration-appearance-dark-style-slightly-round.svg +++ b/resources/icons/scalable/status/illustration-appearance-dark-style-slightly-round.svg @@ -1,9 +1,9 @@ - - - - - - - + + + + + + + diff --git a/resources/icons/scalable/status/illustration-appearance-dark-style-square.svg b/resources/icons/scalable/status/illustration-appearance-dark-style-square.svg index e4c35a74..dd3f8e99 100644 --- a/resources/icons/scalable/status/illustration-appearance-dark-style-square.svg +++ b/resources/icons/scalable/status/illustration-appearance-dark-style-square.svg @@ -1,9 +1,9 @@ - - - - - - - + + + + + + + diff --git a/resources/icons/scalable/status/illustration-appearance-light-style-round.svg b/resources/icons/scalable/status/illustration-appearance-light-style-round.svg index 5f2313b7..aa89c94b 100644 --- a/resources/icons/scalable/status/illustration-appearance-light-style-round.svg +++ b/resources/icons/scalable/status/illustration-appearance-light-style-round.svg @@ -1,9 +1,9 @@ - - - - - - - + + + + + + + diff --git a/resources/icons/scalable/status/illustration-appearance-light-style-slightly-round.svg b/resources/icons/scalable/status/illustration-appearance-light-style-slightly-round.svg index 445c02d6..7a49c389 100644 --- a/resources/icons/scalable/status/illustration-appearance-light-style-slightly-round.svg +++ b/resources/icons/scalable/status/illustration-appearance-light-style-slightly-round.svg @@ -1,9 +1,9 @@ - - - - - - - + + + + + + + diff --git a/resources/icons/scalable/status/illustration-appearance-light-style-square.svg b/resources/icons/scalable/status/illustration-appearance-light-style-square.svg index dd3f8e99..e4c35a74 100644 --- a/resources/icons/scalable/status/illustration-appearance-light-style-square.svg +++ b/resources/icons/scalable/status/illustration-appearance-light-style-square.svg @@ -1,9 +1,9 @@ - - - - - - - + + + + + + + From af055641f13412b2238772168e739eb56a6ac257 Mon Sep 17 00:00:00 2001 From: Ashley Wulber Date: Tue, 10 Oct 2023 13:54:19 -0400 Subject: [PATCH 13/27] feat: cosmic-comp theme variables --- app/src/pages/desktop/appearance.rs | 103 ++++++++++++++++++++-------- 1 file changed, 74 insertions(+), 29 deletions(-) diff --git a/app/src/pages/desktop/appearance.rs b/app/src/pages/desktop/appearance.rs index 82d313ce..6d3ddefe 100644 --- a/app/src/pages/desktop/appearance.rs +++ b/app/src/pages/desktop/appearance.rs @@ -33,15 +33,13 @@ enum NamedColorPicker { ContainerBackground, InterfaceText, ControlComponent, + AccentWindowHint, } // TODO integrate with settings backend pub struct Page { - accent_window_hint: bool, - frosted: bool, - window_hint_size: u16, - gap_size: u16, can_reset: bool, custom_accent: ColorPickerModel, + accent_window_hint: ColorPickerModel, application_background: ColorPickerModel, container_background: ColorPickerModel, interface_text: ColorPickerModel, @@ -105,10 +103,6 @@ impl From<(Option, ThemeMode)> for Page { ); // TODO fill all these values with the current values Self { - accent_window_hint: Default::default(), - frosted: Default::default(), - window_hint_size: Default::default(), - gap_size: Default::default(), can_reset: if theme_mode.is_dark { theme_builder == ThemeBuilder::dark() } else { @@ -145,6 +139,12 @@ impl From<(Option, ThemeMode)> for Page { None, theme_builder.neutral_tint.map(Color::from), ), + accent_window_hint: ColorPickerModel::new( + fl!("hex"), + fl!("rgb"), + None, + theme_builder.window_hint.map(Color::from), + ), active_dialog: None, theme_mode_config, theme_builder_config, @@ -159,10 +159,10 @@ pub enum Message { Entered, DarkMode(bool), Autoswitch(bool), - AccentWindowHint(bool), Frosted(bool), WindowHintSize(spin_button::Message), GapSize(spin_button::Message), + AccentWindowHint(ColorPickerUpdate), ApplicationBackground(ColorPickerUpdate), ContainerBackground(ColorPickerUpdate), PaletteAccent(cosmic::iced::Color), @@ -256,28 +256,58 @@ impl Page { if !enabled {} Command::none() } - Message::AccentWindowHint(enabled) => { - // TODO write to cosmic comp config - self.accent_window_hint = enabled; - Command::none() + Message::AccentWindowHint(u) => { + let cmd = match &u { + ColorPickerUpdate::AppliedColor | ColorPickerUpdate::Reset => { + // close the color picker dialog + // apply changes + theme_builder_needs_update = true; + close_window::(COLOR_PICKER_DIALOG_ID) + } + // TODO apply changes + ColorPickerUpdate::ActionFinished => { + theme_builder_needs_update = true; + _ = self + .accent_window_hint + .update::(ColorPickerUpdate::AppliedColor); + Command::none() + } + ColorPickerUpdate::Cancel => { + // close the color picker dialog + close_window(COLOR_PICKER_DIALOG_ID) + } + ColorPickerUpdate::ToggleColorPicker => { + // create the color picker dialog + // set the active picker + self.active_dialog = Some(NamedColorPicker::AccentWindowHint); + get_window(color_picker_window_settings()) + } + _ => Command::none(), + }; + Command::batch(vec![cmd, self.accent_window_hint.update::(u)]) } Message::Frosted(enabled) => { - // TODO add variable to the config - self.frosted = enabled; + theme_builder_needs_update = true; + self.theme_builder.is_frosted = enabled; Command::none() } Message::WindowHintSize(msg) => { - // TODO write to cosmic comp config - self.window_hint_size = match msg { - spin_button::Message::Increment => self.window_hint_size.saturating_add(1), - spin_button::Message::Decrement => self.window_hint_size.saturating_sub(1), + theme_builder_needs_update = true; + self.theme_builder.active_hint = match msg { + spin_button::Message::Increment => { + self.theme_builder.active_hint.saturating_add(1) + } + spin_button::Message::Decrement => { + self.theme_builder.active_hint.saturating_sub(1) + } }; Command::none() } Message::GapSize(msg) => { - self.gap_size = match msg { - spin_button::Message::Increment => self.gap_size.saturating_add(1), - spin_button::Message::Decrement => self.gap_size.saturating_sub(1), + theme_builder_needs_update = true; + self.theme_builder.gaps.1 = match msg { + spin_button::Message::Increment => self.theme_builder.gaps.1.saturating_add(1), + spin_button::Message::Decrement => self.theme_builder.gaps.1.saturating_sub(1), }; Command::none() } @@ -467,6 +497,11 @@ impl Page { .interface_text .update::(ColorPickerUpdate::AppliedColor); } + Some(NamedColorPicker::AccentWindowHint) => { + _ = self + .accent_window_hint + .update::(ColorPickerUpdate::AppliedColor); + } None => { theme_builder_needs_update = false; warn!("Unknown appearance dialog closed."); @@ -515,6 +550,7 @@ impl Page { .map(Srgba::from); theme_builder.text_tint = self.interface_text.get_applied_color().map(Srgb::from); theme_builder.neutral_tint = self.control_component.get_applied_color().map(Srgb::from); + theme_builder.window_hint = self.accent_window_hint.get_applied_color().map(Srgb::from); _ = theme_builder.write_entry(config); @@ -560,6 +596,9 @@ impl Page { } Some(NamedColorPicker::CustomAccent) => (&self.custom_accent, Message::CustomAccent), Some(NamedColorPicker::InterfaceText) => (&self.interface_text, Message::InterfaceText), + Some(NamedColorPicker::AccentWindowHint) => { + (&self.accent_window_hint, Message::AccentWindowHint) + } None => return text("OOPS!").into(), }; column![ @@ -653,8 +692,7 @@ pub fn mode_and_colors() -> Section { let cur_accent = page .theme_builder .accent - .map(Srgba::from) - .unwrap_or(palette.accent_blue); + .map_or(palette.accent_blue, Srgba::from); settings::view_section(§ion.title) .add( container( @@ -810,8 +848,12 @@ pub fn mode_and_colors() -> Section { ), ) .add( - settings::item::builder(&descriptions[12]) - .toggler(page.accent_window_hint, Message::AccentWindowHint), + settings::item::builder(&descriptions[12]).control( + page.accent_window_hint + .picker_button(Message::AccentWindowHint) + .width(Length::Fixed(48.0)) + .height(Length::Fixed(24.0)), + ), ) .apply(Element::from) .map(crate::pages::Message::Appearance) @@ -911,7 +953,7 @@ pub fn style() -> Section { .add( settings::item::builder(&descriptions[3]) .description(&descriptions[4]) - .toggler(page.frosted, Message::Frosted), + .toggler(page.theme_builder.is_frosted, Message::Frosted), ) .apply(Element::from) .map(crate::pages::Message::Appearance) @@ -932,12 +974,15 @@ pub fn window_management() -> Section { settings::view_section(§ion.title) .add(settings::item::builder(&descriptions[0]).control( cosmic::widget::spin_button( - page.window_hint_size.to_string(), + page.theme_builder.active_hint.to_string(), Message::WindowHintSize, ), )) .add(settings::item::builder(&descriptions[1]).control( - cosmic::widget::spin_button(page.gap_size.to_string(), Message::GapSize), + cosmic::widget::spin_button( + page.theme_builder.gaps.1.to_string(), + Message::GapSize, + ), )) .apply(Element::from) .map(crate::pages::Message::Appearance) From f99b3b2648d323cc0ec7fbdd465ef4ffb026f55a Mon Sep 17 00:00:00 2001 From: Ashley Wulber Date: Tue, 10 Oct 2023 14:11:02 -0400 Subject: [PATCH 14/27] use git deps --- Cargo.lock | 17 +++++++++++++++++ Cargo.toml | 8 ++++---- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8adc8c9e..28e398a7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -816,6 +816,7 @@ dependencies = [ [[package]] name = "cosmic-config" version = "0.1.0" +source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#e60a5304c68e2727526e5216f3220bc461a13b46" dependencies = [ "atomicwrites", "calloop 0.12.2", @@ -830,6 +831,7 @@ dependencies = [ [[package]] name = "cosmic-config-derive" version = "0.1.0" +source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#e60a5304c68e2727526e5216f3220bc461a13b46" dependencies = [ "quote", "syn 1.0.109", @@ -963,6 +965,7 @@ dependencies = [ [[package]] name = "cosmic-theme" version = "0.1.0" +source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#e60a5304c68e2727526e5216f3220bc461a13b46" dependencies = [ "almost", "cosmic-config", @@ -2200,6 +2203,7 @@ dependencies = [ [[package]] name = "iced" version = "0.10.0" +source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#e60a5304c68e2727526e5216f3220bc461a13b46" dependencies = [ "iced_accessibility", "iced_core", @@ -2215,6 +2219,7 @@ dependencies = [ [[package]] name = "iced_accessibility" version = "0.1.0" +source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#e60a5304c68e2727526e5216f3220bc461a13b46" dependencies = [ "accesskit", "accesskit_unix", @@ -2223,6 +2228,7 @@ dependencies = [ [[package]] name = "iced_core" version = "0.10.0" +source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#e60a5304c68e2727526e5216f3220bc461a13b46" dependencies = [ "bitflags 1.3.2", "iced_accessibility", @@ -2237,6 +2243,7 @@ dependencies = [ [[package]] name = "iced_futures" version = "0.7.0" +source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#e60a5304c68e2727526e5216f3220bc461a13b46" dependencies = [ "futures", "iced_core", @@ -2249,6 +2256,7 @@ dependencies = [ [[package]] name = "iced_graphics" version = "0.9.0" +source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#e60a5304c68e2727526e5216f3220bc461a13b46" dependencies = [ "bitflags 1.3.2", "bytemuck", @@ -2266,6 +2274,7 @@ dependencies = [ [[package]] name = "iced_renderer" version = "0.1.0" +source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#e60a5304c68e2727526e5216f3220bc461a13b46" dependencies = [ "iced_graphics", "iced_tiny_skia", @@ -2278,6 +2287,7 @@ dependencies = [ [[package]] name = "iced_runtime" version = "0.1.1" +source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#e60a5304c68e2727526e5216f3220bc461a13b46" dependencies = [ "iced_accessibility", "iced_core", @@ -2289,6 +2299,7 @@ dependencies = [ [[package]] name = "iced_sctk" version = "0.1.0" +source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#e60a5304c68e2727526e5216f3220bc461a13b46" dependencies = [ "enum-repr", "float-cmp", @@ -2312,6 +2323,7 @@ dependencies = [ [[package]] name = "iced_style" version = "0.9.0" +source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#e60a5304c68e2727526e5216f3220bc461a13b46" dependencies = [ "iced_core", "once_cell", @@ -2321,6 +2333,7 @@ dependencies = [ [[package]] name = "iced_tiny_skia" version = "0.1.0" +source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#e60a5304c68e2727526e5216f3220bc461a13b46" dependencies = [ "bytemuck", "cosmic-text", @@ -2338,6 +2351,7 @@ dependencies = [ [[package]] name = "iced_wgpu" version = "0.11.1" +source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#e60a5304c68e2727526e5216f3220bc461a13b46" dependencies = [ "bitflags 1.3.2", "bytemuck", @@ -2359,6 +2373,7 @@ dependencies = [ [[package]] name = "iced_widget" version = "0.1.3" +source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#e60a5304c68e2727526e5216f3220bc461a13b46" dependencies = [ "iced_renderer", "iced_runtime", @@ -2373,6 +2388,7 @@ dependencies = [ [[package]] name = "iced_winit" version = "0.10.0" +source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#e60a5304c68e2727526e5216f3220bc461a13b46" dependencies = [ "iced_graphics", "iced_runtime", @@ -2767,6 +2783,7 @@ checksum = "9cdc71e17332e86d2e1d38c1f99edcb6288ee11b815fb1a4b049eaa2114d369b" [[package]] name = "libcosmic" version = "0.1.0" +source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#e60a5304c68e2727526e5216f3220bc461a13b46" dependencies = [ "apply", "ashpd", diff --git a/Cargo.toml b/Cargo.toml index 8f71c93b..9fc3ccb4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,10 +26,10 @@ git = "https://github.com/pop-os/cosmic-comp" git = "https://github.com/pop-os/cosmic-panel" [patch."https://github.com/pop-os/libcosmic"] -libcosmic = { path = "../libcosmic" } -cosmic-config = { path = "../libcosmic/cosmic-config" } -# libcosmic = { git = "https://github.com/pop-os/libcosmic//", branch = "theme-dark-light-switching" } -# cosmic-config = { git = "https://github.com/pop-os/libcosmic//", branch = "theme-dark-light-switching" } +# libcosmic = { path = "../libcosmic" } +# cosmic-config = { path = "../libcosmic/cosmic-config" } +libcosmic = { git = "https://github.com/pop-os/libcosmic//", branch = "theme-dark-light-switching" } +cosmic-config = { git = "https://github.com/pop-os/libcosmic//", branch = "theme-dark-light-switching" } [patch."https://github.com/Smithay/client-toolkit"] sctk = { git = "https://github.com/smithay/client-toolkit//", package = "smithay-client-toolkit", rev = "dc8c4a0"} From 2290cd78a4566bd002aa5ebc8de6dce53951abe2 Mon Sep 17 00:00:00 2001 From: Ashley Wulber Date: Tue, 10 Oct 2023 14:15:31 -0400 Subject: [PATCH 15/27] fix: add dep to control --- debian/control | 1 + 1 file changed, 1 insertion(+) diff --git a/debian/control b/debian/control index 9118b3f5..ce2372fa 100644 --- a/debian/control +++ b/debian/control @@ -11,6 +11,7 @@ Build-Depends: libfontconfig-dev, libfreetype-dev, lld, + libwayland-dev, pkg-config, libxkbcommon-dev, libudev-dev, From 65aec022d941a37602941e25c37f5ba56e469a59 Mon Sep 17 00:00:00 2001 From: Ashley Wulber Date: Tue, 10 Oct 2023 14:17:00 -0400 Subject: [PATCH 16/27] fix: install libwayland-dev --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5464bc65..c8b456f5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,7 +21,7 @@ jobs: runs-on: ubuntu-latest steps: - name: install system dependencies - run: sudo apt-get update && sudo apt-get install lld cmake libexpat1-dev libfontconfig-dev libfreetype-dev pkg-config libxkbcommon-dev libudev-dev libinput-dev + run: sudo apt-get update && sudo apt-get install lld cmake libexpat1-dev libfontconfig-dev libfreetype-dev pkg-config libxkbcommon-dev libudev-dev libinput-dev libwayland-dev - uses: actions/checkout@v3 - name: install toolchain run: rustup toolchain install 1.70.0 --component clippy @@ -33,7 +33,7 @@ jobs: runs-on: ubuntu-latest steps: - name: install system dependencies - run: sudo apt-get update && sudo apt-get install lld cmake libexpat1-dev libfontconfig-dev libfreetype-dev pkg-config libxkbcommon-dev libudev-dev libinput-dev + run: sudo apt-get update && sudo apt-get install lld cmake libexpat1-dev libfontconfig-dev libfreetype-dev pkg-config libxkbcommon-dev libudev-dev libinput-dev libwayland-dev - uses: actions/checkout@v3 - name: install toolchain run: rustup show From 85a51c68dcaaa0086a9e1c52cd701167d75eb832 Mon Sep 17 00:00:00 2001 From: Ashley Wulber Date: Wed, 11 Oct 2023 11:00:16 -0400 Subject: [PATCH 17/27] udpate libcosmic --- Cargo.lock | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 28e398a7..4826c8db 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -816,7 +816,7 @@ dependencies = [ [[package]] name = "cosmic-config" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#e60a5304c68e2727526e5216f3220bc461a13b46" +source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#0a63eaaff3091796e5f59ed0598f7b0616066e78" dependencies = [ "atomicwrites", "calloop 0.12.2", @@ -831,7 +831,7 @@ dependencies = [ [[package]] name = "cosmic-config-derive" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#e60a5304c68e2727526e5216f3220bc461a13b46" +source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#0a63eaaff3091796e5f59ed0598f7b0616066e78" dependencies = [ "quote", "syn 1.0.109", @@ -965,7 +965,7 @@ dependencies = [ [[package]] name = "cosmic-theme" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#e60a5304c68e2727526e5216f3220bc461a13b46" +source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#0a63eaaff3091796e5f59ed0598f7b0616066e78" dependencies = [ "almost", "cosmic-config", @@ -2203,7 +2203,7 @@ dependencies = [ [[package]] name = "iced" version = "0.10.0" -source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#e60a5304c68e2727526e5216f3220bc461a13b46" +source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#0a63eaaff3091796e5f59ed0598f7b0616066e78" dependencies = [ "iced_accessibility", "iced_core", @@ -2219,7 +2219,7 @@ dependencies = [ [[package]] name = "iced_accessibility" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#e60a5304c68e2727526e5216f3220bc461a13b46" +source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#0a63eaaff3091796e5f59ed0598f7b0616066e78" dependencies = [ "accesskit", "accesskit_unix", @@ -2228,7 +2228,7 @@ dependencies = [ [[package]] name = "iced_core" version = "0.10.0" -source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#e60a5304c68e2727526e5216f3220bc461a13b46" +source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#0a63eaaff3091796e5f59ed0598f7b0616066e78" dependencies = [ "bitflags 1.3.2", "iced_accessibility", @@ -2243,7 +2243,7 @@ dependencies = [ [[package]] name = "iced_futures" version = "0.7.0" -source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#e60a5304c68e2727526e5216f3220bc461a13b46" +source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#0a63eaaff3091796e5f59ed0598f7b0616066e78" dependencies = [ "futures", "iced_core", @@ -2256,7 +2256,7 @@ dependencies = [ [[package]] name = "iced_graphics" version = "0.9.0" -source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#e60a5304c68e2727526e5216f3220bc461a13b46" +source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#0a63eaaff3091796e5f59ed0598f7b0616066e78" dependencies = [ "bitflags 1.3.2", "bytemuck", @@ -2274,7 +2274,7 @@ dependencies = [ [[package]] name = "iced_renderer" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#e60a5304c68e2727526e5216f3220bc461a13b46" +source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#0a63eaaff3091796e5f59ed0598f7b0616066e78" dependencies = [ "iced_graphics", "iced_tiny_skia", @@ -2287,7 +2287,7 @@ dependencies = [ [[package]] name = "iced_runtime" version = "0.1.1" -source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#e60a5304c68e2727526e5216f3220bc461a13b46" +source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#0a63eaaff3091796e5f59ed0598f7b0616066e78" dependencies = [ "iced_accessibility", "iced_core", @@ -2299,7 +2299,7 @@ dependencies = [ [[package]] name = "iced_sctk" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#e60a5304c68e2727526e5216f3220bc461a13b46" +source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#0a63eaaff3091796e5f59ed0598f7b0616066e78" dependencies = [ "enum-repr", "float-cmp", @@ -2323,7 +2323,7 @@ dependencies = [ [[package]] name = "iced_style" version = "0.9.0" -source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#e60a5304c68e2727526e5216f3220bc461a13b46" +source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#0a63eaaff3091796e5f59ed0598f7b0616066e78" dependencies = [ "iced_core", "once_cell", @@ -2333,7 +2333,7 @@ dependencies = [ [[package]] name = "iced_tiny_skia" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#e60a5304c68e2727526e5216f3220bc461a13b46" +source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#0a63eaaff3091796e5f59ed0598f7b0616066e78" dependencies = [ "bytemuck", "cosmic-text", @@ -2351,7 +2351,7 @@ dependencies = [ [[package]] name = "iced_wgpu" version = "0.11.1" -source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#e60a5304c68e2727526e5216f3220bc461a13b46" +source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#0a63eaaff3091796e5f59ed0598f7b0616066e78" dependencies = [ "bitflags 1.3.2", "bytemuck", @@ -2373,7 +2373,7 @@ dependencies = [ [[package]] name = "iced_widget" version = "0.1.3" -source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#e60a5304c68e2727526e5216f3220bc461a13b46" +source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#0a63eaaff3091796e5f59ed0598f7b0616066e78" dependencies = [ "iced_renderer", "iced_runtime", @@ -2388,7 +2388,7 @@ dependencies = [ [[package]] name = "iced_winit" version = "0.10.0" -source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#e60a5304c68e2727526e5216f3220bc461a13b46" +source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#0a63eaaff3091796e5f59ed0598f7b0616066e78" dependencies = [ "iced_graphics", "iced_runtime", @@ -2783,7 +2783,7 @@ checksum = "9cdc71e17332e86d2e1d38c1f99edcb6288ee11b815fb1a4b049eaa2114d369b" [[package]] name = "libcosmic" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#e60a5304c68e2727526e5216f3220bc461a13b46" +source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#0a63eaaff3091796e5f59ed0598f7b0616066e78" dependencies = [ "apply", "ashpd", From cb7716847f13e7b35404690c72f06b967f6d3c8c Mon Sep 17 00:00:00 2001 From: Ashley Wulber Date: Wed, 11 Oct 2023 16:10:54 -0400 Subject: [PATCH 18/27] wip: reset to default button --- app/src/pages/desktop/appearance.rs | 77 +++++++++++++++++++++++++++-- i18n/en/cosmic_settings.ftl | 3 ++ 2 files changed, 77 insertions(+), 3 deletions(-) diff --git a/app/src/pages/desktop/appearance.rs b/app/src/pages/desktop/appearance.rs index 6d3ddefe..2b41d1f5 100644 --- a/app/src/pages/desktop/appearance.rs +++ b/app/src/pages/desktop/appearance.rs @@ -171,6 +171,9 @@ pub enum Message { ControlComponent(ColorPickerUpdate), CloseRequested(window::Id), Roundness(Roundness), + Import, + Export, + Reset, Left, } @@ -533,6 +536,41 @@ impl Page { theme_builder_needs_update = true; Command::none() } + Message::Reset => { + self.theme_builder = if self.theme_mode.is_dark { + ThemeBuilder::dark() + } else { + ThemeBuilder::light() + }; + if let Some(config) = self.theme_builder_config.as_ref() { + _ = self.theme_builder.write_entry(config); + }; + + let config = if self.theme_mode.is_dark { + Theme::::dark_config() + } else { + Theme::::light_config() + }; + let new_theme = self.theme_builder.clone().build(); + if let Ok(config) = config { + _ = new_theme.write_entry(&config); + } else { + tracing::error!("Failed to get the theme config."); + } + + *self = Self::from((self.theme_mode_config.clone(), self.theme_mode)); + Command::perform(async {}, |_| { + crate::Message::SetTheme(cosmic::theme::Theme::custom(Arc::new(new_theme))) + }) + } + Message::Import => { + // TODO get file from portal + Command::none() + } + Message::Export => { + // TODO write file using portal + Command::none() + } }; if theme_builder_needs_update { @@ -572,14 +610,18 @@ impl Page { ret, Command::perform(async {}, |_| { crate::Message::SetTheme(cosmic::theme::Theme::custom(Arc::new( - // TODO set the values of the theme builder theme_builder.build(), ))) }), ]); } - // TODO if there were some changes, rebuild and apply to the config + self.can_reset = if self.theme_mode.is_dark { + self.theme_builder != ThemeBuilder::dark() + } else { + self.theme_builder != ThemeBuilder::light() + }; + ret } @@ -631,6 +673,7 @@ impl page::Page for Page { sections: &mut SlotMap>, ) -> Option { Some(vec![ + sections.insert(import_export()), sections.insert(mode_and_colors()), sections.insert(style()), sections.insert(window_management()), @@ -657,6 +700,30 @@ impl page::Page for Page { } } +fn import_export() -> Section { + Section::default() + .descriptions(vec![fl!("import"), fl!("export")]) + .view::(|_binder, page, section| { + let spacing = &page.theme_builder.spacing; + let descriptions = §ion.descriptions; + container( + row![ + button(text(&descriptions[0])) + .on_press(Message::Import) + .padding([spacing.space_xxs, spacing.space_xs]), + button(text(&descriptions[1])) + .on_press(Message::Export) + .padding([spacing.space_xxs, spacing.space_xs]) + ] + .spacing(8.0), + ) + .width(Length::Fill) + .align_x(cosmic::iced_core::alignment::Horizontal::Right) + .apply(Element::from) + .map(crate::pages::Message::Appearance) + }) +} + #[allow(clippy::too_many_lines)] pub fn mode_and_colors() -> Section { Section::default() @@ -994,9 +1061,13 @@ pub fn reset_button() -> Section { Section::default() .descriptions(vec![fl!("reset-default")]) .view::(|_binder, page, section| { + let spacing = &page.theme_builder.spacing; let descriptions = §ion.descriptions; if page.can_reset { - row![button(text(&descriptions[0]))].apply(Element::from) + row![button(text(&descriptions[0])) + .on_press(Message::Reset) + .padding([spacing.space_xxs, spacing.space_xs])] + .apply(Element::from) } else { horizontal_space(1).apply(Element::from) } diff --git a/i18n/en/cosmic_settings.ftl b/i18n/en/cosmic_settings.ftl index 84d75582..f5c05272 100644 --- a/i18n/en/cosmic_settings.ftl +++ b/i18n/en/cosmic_settings.ftl @@ -13,6 +13,9 @@ desktop = Desktop appearance = Appearance .desc = Accent colors and COSMIC theming. +import = Import +export = Export + mode-and-colors = Mode and Colors auto-switch = Automatically switch from Light to Dark mode .desc = Switches to Light mode at sunrise From 58bcd88f88a7307d713ba6913212cb555762a2dc Mon Sep 17 00:00:00 2001 From: Ashley Wulber Date: Thu, 12 Oct 2023 13:37:14 -0400 Subject: [PATCH 19/27] refactor: color button improvements --- Cargo.lock | 197 ++++++++++++++-------------- app/src/app.rs | 6 +- app/src/pages/desktop/appearance.rs | 48 ++++--- 3 files changed, 135 insertions(+), 116 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4826c8db..d03b1dac 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -69,9 +69,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea5d730647d4fadd988536d06fecce94b7b4f2a7efdae548f1cf4b63205518ab" +checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" dependencies = [ "memchr", ] @@ -184,7 +184,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c48ccdbf6ca6b121e0f586cbc0e73ae440e56c67c30fa0873b4e110d9c26d2b" dependencies = [ - "event-listener", + "event-listener 2.5.3", "futures-core", ] @@ -195,7 +195,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" dependencies = [ "concurrent-queue", - "event-listener", + "event-listener 2.5.3", "futures-core", ] @@ -251,24 +251,23 @@ version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "287272293e9d8c41773cec55e365490fe034813a2f172f502d6ddcf75b2f582b" dependencies = [ - "event-listener", + "event-listener 2.5.3", ] [[package]] name = "async-process" -version = "1.7.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a9d28b1d97e08915212e2e45310d47854eafa69600756fc735fb788f75199c9" +checksum = "ea6438ba0a08d81529c69b36700fa2f95837bfe3e776ab39cde9c14d9149da88" dependencies = [ "async-io", "async-lock", - "autocfg", + "async-signal", "blocking", "cfg-if", - "event-listener", + "event-listener 3.0.0", "futures-lite", - "rustix 0.37.24", - "signal-hook", + "rustix 0.38.18", "windows-sys 0.48.0", ] @@ -283,6 +282,24 @@ dependencies = [ "syn 2.0.38", ] +[[package]] +name = "async-signal" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2a5415b7abcdc9cd7d63d6badba5288b2ca017e3fbd4173b8f405449f1a2399" +dependencies = [ + "async-io", + "async-lock", + "atomic-waker", + "cfg-if", + "futures-core", + "futures-io", + "rustix 0.38.18", + "signal-hook-registry", + "slab", + "windows-sys 0.48.0", +] + [[package]] name = "async-task" version = "4.4.1" @@ -308,11 +325,11 @@ checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "atomicwrites" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1163d9d7c51de51a2b79d6df5e8888d11e9df17c752ce4a285fb6ca1580734e" +checksum = "f4d45f362125ed144544e57b0ec6de8fd6a296d41a6252fc4a20c0cf12e9ed3a" dependencies = [ - "rustix 0.37.24", + "rustix 0.38.18", "tempfile", "windows-sys 0.48.0", ] @@ -424,9 +441,9 @@ dependencies = [ [[package]] name = "blocking" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94c4ef1f913d78636d78d538eec1f18de81e481f44b1be0a81060090530846e1" +checksum = "8c36a4d0d48574b3dd360b4b7d95cc651d2b6557b6402848a27d4b228a473e2a" dependencies = [ "async-channel", "async-lock", @@ -475,9 +492,9 @@ dependencies = [ [[package]] name = "byteorder" -version = "1.4.3" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" @@ -511,14 +528,14 @@ dependencies = [ [[package]] name = "calloop" -version = "0.12.2" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aadd183e815348c0649051b1c43418643208f8ed13c8a84da7215b4e1cf42714" +checksum = "7b50b5a44d59a98c55a9eeb518f39bf7499ba19fd98ee7d22618687f3f10adbf" dependencies = [ "bitflags 2.4.0", "log", "polling 3.2.0", - "rustix 0.38.17", + "rustix 0.38.18", "slab", "thiserror", ] @@ -529,8 +546,8 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0f0ea9b9476c7fad82841a8dbb380e2eae480c21910feba80725b46931ed8f02" dependencies = [ - "calloop 0.12.2", - "rustix 0.38.17", + "calloop 0.12.3", + "rustix 0.38.18", "wayland-backend 0.3.2", "wayland-client 0.31.1", ] @@ -793,7 +810,7 @@ dependencies = [ [[package]] name = "cosmic-bg-config" version = "0.1.0" -source = "git+https://github.com/pop-os/cosmic-bg#749f3ea139519fffaa2641f80b6fba1379b3ad63" +source = "git+https://github.com/pop-os/cosmic-bg#6a6fe4e387e46c2e159df56a9768220a6269ccf4" dependencies = [ "colorgrad", "cosmic-config", @@ -807,7 +824,7 @@ dependencies = [ [[package]] name = "cosmic-comp-config" version = "0.1.0" -source = "git+https://github.com/pop-os/cosmic-comp#e1e5dd994aaa0c415e8fc797ad53066a504f774a" +source = "git+https://github.com/pop-os/cosmic-comp#806e10fcd9775442a530abcd9d689710568a7fa4" dependencies = [ "input", "serde", @@ -816,10 +833,10 @@ dependencies = [ [[package]] name = "cosmic-config" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#0a63eaaff3091796e5f59ed0598f7b0616066e78" +source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#b1cb008d94387dec0006a2a4169e0f912a70d394" dependencies = [ "atomicwrites", - "calloop 0.12.2", + "calloop 0.12.3", "cosmic-config-derive", "dirs 5.0.1", "iced_futures", @@ -831,7 +848,7 @@ dependencies = [ [[package]] name = "cosmic-config-derive" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#0a63eaaff3091796e5f59ed0598f7b0616066e78" +source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#b1cb008d94387dec0006a2a4169e0f912a70d394" dependencies = [ "quote", "syn 1.0.109", @@ -965,7 +982,7 @@ dependencies = [ [[package]] name = "cosmic-theme" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#0a63eaaff3091796e5f59ed0598f7b0616066e78" +source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#b1cb008d94387dec0006a2a4169e0f912a70d394" dependencies = [ "almost", "cosmic-config", @@ -1398,25 +1415,14 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "add4f07d43996f76ef320709726a556a9d4f965d9410d8d0271132d2f8293480" +checksum = "ac3e13f66a2f95e32a39eaa81f6b95d42878ca0e1db0c7543723dfe12557e860" dependencies = [ - "errno-dragonfly", "libc", "windows-sys 0.48.0", ] -[[package]] -name = "errno-dragonfly" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" -dependencies = [ - "cc", - "libc", -] - [[package]] name = "error-code" version = "2.3.1" @@ -1452,6 +1458,17 @@ version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" +[[package]] +name = "event-listener" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29e56284f00d94c1bc7fd3c77027b4623c88c1f53d8d2394c6199f2921dea325" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite", +] + [[package]] name = "expat-sys" version = "2.1.6" @@ -2203,7 +2220,7 @@ dependencies = [ [[package]] name = "iced" version = "0.10.0" -source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#0a63eaaff3091796e5f59ed0598f7b0616066e78" +source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#b1cb008d94387dec0006a2a4169e0f912a70d394" dependencies = [ "iced_accessibility", "iced_core", @@ -2219,7 +2236,7 @@ dependencies = [ [[package]] name = "iced_accessibility" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#0a63eaaff3091796e5f59ed0598f7b0616066e78" +source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#b1cb008d94387dec0006a2a4169e0f912a70d394" dependencies = [ "accesskit", "accesskit_unix", @@ -2228,7 +2245,7 @@ dependencies = [ [[package]] name = "iced_core" version = "0.10.0" -source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#0a63eaaff3091796e5f59ed0598f7b0616066e78" +source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#b1cb008d94387dec0006a2a4169e0f912a70d394" dependencies = [ "bitflags 1.3.2", "iced_accessibility", @@ -2243,7 +2260,7 @@ dependencies = [ [[package]] name = "iced_futures" version = "0.7.0" -source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#0a63eaaff3091796e5f59ed0598f7b0616066e78" +source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#b1cb008d94387dec0006a2a4169e0f912a70d394" dependencies = [ "futures", "iced_core", @@ -2256,7 +2273,7 @@ dependencies = [ [[package]] name = "iced_graphics" version = "0.9.0" -source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#0a63eaaff3091796e5f59ed0598f7b0616066e78" +source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#b1cb008d94387dec0006a2a4169e0f912a70d394" dependencies = [ "bitflags 1.3.2", "bytemuck", @@ -2274,7 +2291,7 @@ dependencies = [ [[package]] name = "iced_renderer" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#0a63eaaff3091796e5f59ed0598f7b0616066e78" +source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#b1cb008d94387dec0006a2a4169e0f912a70d394" dependencies = [ "iced_graphics", "iced_tiny_skia", @@ -2287,7 +2304,7 @@ dependencies = [ [[package]] name = "iced_runtime" version = "0.1.1" -source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#0a63eaaff3091796e5f59ed0598f7b0616066e78" +source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#b1cb008d94387dec0006a2a4169e0f912a70d394" dependencies = [ "iced_accessibility", "iced_core", @@ -2299,7 +2316,7 @@ dependencies = [ [[package]] name = "iced_sctk" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#0a63eaaff3091796e5f59ed0598f7b0616066e78" +source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#b1cb008d94387dec0006a2a4169e0f912a70d394" dependencies = [ "enum-repr", "float-cmp", @@ -2323,7 +2340,7 @@ dependencies = [ [[package]] name = "iced_style" version = "0.9.0" -source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#0a63eaaff3091796e5f59ed0598f7b0616066e78" +source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#b1cb008d94387dec0006a2a4169e0f912a70d394" dependencies = [ "iced_core", "once_cell", @@ -2333,7 +2350,7 @@ dependencies = [ [[package]] name = "iced_tiny_skia" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#0a63eaaff3091796e5f59ed0598f7b0616066e78" +source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#b1cb008d94387dec0006a2a4169e0f912a70d394" dependencies = [ "bytemuck", "cosmic-text", @@ -2351,7 +2368,7 @@ dependencies = [ [[package]] name = "iced_wgpu" version = "0.11.1" -source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#0a63eaaff3091796e5f59ed0598f7b0616066e78" +source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#b1cb008d94387dec0006a2a4169e0f912a70d394" dependencies = [ "bitflags 1.3.2", "bytemuck", @@ -2373,7 +2390,7 @@ dependencies = [ [[package]] name = "iced_widget" version = "0.1.3" -source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#0a63eaaff3091796e5f59ed0598f7b0616066e78" +source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#b1cb008d94387dec0006a2a4169e0f912a70d394" dependencies = [ "iced_renderer", "iced_runtime", @@ -2388,7 +2405,7 @@ dependencies = [ [[package]] name = "iced_winit" version = "0.10.0" -source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#0a63eaaff3091796e5f59ed0598f7b0616066e78" +source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#b1cb008d94387dec0006a2a4169e0f912a70d394" dependencies = [ "iced_graphics", "iced_runtime", @@ -2667,7 +2684,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ "hermit-abi", - "rustix 0.38.17", + "rustix 0.38.18", "windows-sys 0.48.0", ] @@ -2776,14 +2793,14 @@ checksum = "03087c2bad5e1034e8cace5926dec053fb3790248370865f5117a7d0213354c8" [[package]] name = "libc" -version = "0.2.148" +version = "0.2.149" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cdc71e17332e86d2e1d38c1f99edcb6288ee11b815fb1a4b049eaa2114d369b" +checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b" [[package]] name = "libcosmic" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#0a63eaaff3091796e5f59ed0598f7b0616066e78" +source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#b1cb008d94387dec0006a2a4169e0f912a70d394" dependencies = [ "apply", "ashpd", @@ -2836,9 +2853,9 @@ dependencies = [ [[package]] name = "libm" -version = "0.2.7" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7012b1bbb0719e1097c47611d3898568c546d597c2e74d66f6087edd5233ff4" +checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" [[package]] name = "libudev-sys" @@ -2858,9 +2875,9 @@ checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" [[package]] name = "linux-raw-sys" -version = "0.4.8" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3852614a3bd9ca9804678ba6be5e3b8ce76dfc902cae004e3e0c44051b6e88db" +checksum = "da2479e8c062e40bf0066ffa0bc823de0a9368974af99c9f6df941d2c231e03f" [[package]] name = "litemap" @@ -3330,9 +3347,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" +checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" dependencies = [ "autocfg", "libm", @@ -3704,7 +3721,7 @@ dependencies = [ "cfg-if", "concurrent-queue", "pin-project-lite", - "rustix 0.38.17", + "rustix 0.38.18", "tracing", "windows-sys 0.48.0", ] @@ -3751,9 +3768,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.67" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d433d9f1a3e8c1263d9456598b16fec66f4acc9a74dacffd35c7bb09b3a1328" +checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" dependencies = [ "unicode-ident", ] @@ -3914,9 +3931,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.9.6" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebee201405406dbf528b8b672104ae6d6d63e6d118cb10e4d51abbc7b58044ff" +checksum = "d119d7c7ca818f8a53c300863d4f87566aac09943aef5b355bb83969dae75d87" dependencies = [ "aho-corasick", "memchr", @@ -3926,9 +3943,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.3.9" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59b23e92ee4318893fa3fe3e6fb365258efbfe6ac6ab30f090cdcbb7aa37efa9" +checksum = "465c6fc0621e4abc4187a2bda0937bfd4f722c2730b29562e19689ea796c9a4b" dependencies = [ "aho-corasick", "memchr", @@ -3937,9 +3954,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.7.5" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" +checksum = "56d84fdd47036b038fc80dd333d10b6aab10d5d31f4a366e20014def75328d33" [[package]] name = "renderdoc-sys" @@ -4066,14 +4083,14 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.17" +version = "0.38.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f25469e9ae0f3d0047ca8b93fc56843f38e6774f0914a107ff8b41be8be8e0b7" +checksum = "5a74ee2d7c2581cd139b42447d7d9389b889bdaad3a73f1ebb16f2a3237bb19c" dependencies = [ "bitflags 2.4.0", "errno", "libc", - "linux-raw-sys 0.4.8", + "linux-raw-sys 0.4.10", "windows-sys 0.48.0", ] @@ -4256,16 +4273,6 @@ dependencies = [ "lazy_static", ] -[[package]] -name = "signal-hook" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8621587d4798caf8eb44879d42e56b9a93ea5dcd315a6487c357130095b62801" -dependencies = [ - "libc", - "signal-hook-registry", -] - [[package]] name = "signal-hook-registry" version = "1.4.1" @@ -4346,7 +4353,7 @@ source = "git+https://github.com/smithay/client-toolkit//?rev=dc8c4a0#dc8c4a0351 dependencies = [ "bitflags 2.4.0", "bytemuck", - "calloop 0.12.2", + "calloop 0.12.3", "calloop-wayland-source", "cursor-icon", "dlib", @@ -4562,7 +4569,7 @@ dependencies = [ [[package]] name = "taffy" version = "0.3.11" -source = "git+https://github.com/DioxusLabs/taffy?rev=65bedf#65bedf128ec8cef40c1a21b6f141f2c771842cca" +source = "git+https://github.com/DioxusLabs/taffy#9e62e959cb49f18f8b452f0dd1a9c7adb8dd02cb" dependencies = [ "arrayvec 0.7.4", "grid", @@ -4585,7 +4592,7 @@ dependencies = [ "cfg-if", "fastrand 2.0.1", "redox_syscall 0.3.5", - "rustix 0.38.17", + "rustix 0.38.18", "windows-sys 0.48.0", ] @@ -4726,9 +4733,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.32.0" +version = "1.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17ed6077ed6cd6c74735e21f37eb16dc3935f96878b1fe961074089cc80893f9" +checksum = "4f38200e3ef7995e5ef13baec2f432a6da0aa9ac495b2c0e8f3b7eec2c92d653" dependencies = [ "backtrace", "bytes", @@ -5885,9 +5892,9 @@ dependencies = [ [[package]] name = "winnow" -version = "0.5.15" +version = "0.5.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c2e3184b9c4e92ad5167ca73039d0c42476302ab603e2fec4487511f38ccefc" +checksum = "037711d82167854aff2018dfd193aa0fef5370f456732f0d5a0c59b0f1b4b907" dependencies = [ "memchr", ] @@ -6075,7 +6082,7 @@ dependencies = [ "byteorder", "derivative", "enumflags2", - "event-listener", + "event-listener 2.5.3", "futures-core", "futures-sink", "futures-util", diff --git a/app/src/app.rs b/app/src/app.rs index 6c6f6fc6..c7bab4cf 100644 --- a/app/src/app.rs +++ b/app/src/app.rs @@ -190,7 +190,7 @@ impl cosmic::Application for SettingsApp { match message { Message::Page(page) => return self.activate_page(page), - Message::SetWindowTitle => return self.set_window_title(), + Message::SetWindowTitle => return self.set_title(), Message::Search(search::Message::Activate) => { return self.search.focus(); @@ -416,8 +416,8 @@ impl SettingsApp { ]) } - fn set_window_title(&self) -> Command { - cosmic::app::command::set_title(format!( + fn set_title(&mut self) -> Command { + self.set_window_title(format!( "{} - COSMIC Settings", self.pages.info[self.active_page].title )) diff --git a/app/src/pages/desktop/appearance.rs b/app/src/pages/desktop/appearance.rs index 2b41d1f5..96fa11fc 100644 --- a/app/src/pages/desktop/appearance.rs +++ b/app/src/pages/desktop/appearance.rs @@ -15,8 +15,8 @@ use cosmic::iced_sctk::commands::window::{close_window, get_window}; use cosmic::iced_widget::scrollable; use cosmic::widget::icon::{from_name, icon}; use cosmic::widget::{ - button, container, header_bar, horizontal_space, settings, spin_button, text, ColorPickerModel, - ColorPickerUpdate, + button, color_picker::ColorPickerUpdate, container, header_bar, horizontal_space, settings, + spin_button, text, ColorPickerModel, }; use cosmic::{Command, Element}; use cosmic_settings_page::Section; @@ -101,6 +101,24 @@ impl From<(Option, ThemeMode)> for Page { } }, ); + let custom_accent = theme_builder.accent.filter(|c| { + let palette = if theme_mode.is_dark { + Theme::dark_default().palette + } else { + Theme::light_default().palette + }; + let c = Srgba::new(c.red, c.green, c.blue, 1.0); + c != palette.accent_blue + && c != palette.accent_green + && c != palette.accent_indigo + && c != palette.accent_orange + && c != palette.accent_pink + && c != palette.accent_purple + && c != palette.accent_red + && c != palette.accent_warm_grey + && c != palette.accent_yellow + }); + // TODO fill all these values with the current values Self { can_reset: if theme_mode.is_dark { @@ -113,7 +131,7 @@ impl From<(Option, ThemeMode)> for Page { fl!("hex"), fl!("rgb"), None, - theme_builder.accent.map(Color::from), + custom_accent.map(Color::from), ), application_background: ColorPickerModel::new( fl!("hex"), @@ -855,16 +873,10 @@ pub fn mode_and_colors() -> Section { palette.accent_warm_grey.into(), cur_accent == palette.accent_warm_grey, ), - style_color_button( - page.custom_accent.picker_button(Message::CustomAccent), - page.custom_accent - .get_applied_color() - .unwrap_or(cosmic::iced::Color::BLACK), - page.custom_accent.get_applied_color() - == Some(cur_accent.into()) - ) - .width(Length::Fixed(48.0)) - .height(Length::Fixed(48.0)) + page.custom_accent + .picker_button(Message::CustomAccent, None) + .width(Length::Fixed(48.0)) + .height(Length::Fixed(48.0)) ] .padding([0, 0, 16, 0]) .spacing(16) @@ -879,7 +891,7 @@ pub fn mode_and_colors() -> Section { .add( settings::item::builder(&descriptions[3]).control( page.application_background - .picker_button(Message::ApplicationBackground) + .picker_button(Message::ApplicationBackground, Some(24)) .width(Length::Fixed(48.0)) .height(Length::Fixed(24.0)), ), @@ -889,7 +901,7 @@ pub fn mode_and_colors() -> Section { .description(&descriptions[5]) .control( page.container_background - .picker_button(Message::ContainerBackground) + .picker_button(Message::ContainerBackground, Some(24)) .width(Length::Fixed(48.0)) .height(Length::Fixed(24.0)), ), @@ -899,7 +911,7 @@ pub fn mode_and_colors() -> Section { .description(&descriptions[9]) .control( page.interface_text - .picker_button(Message::InterfaceText) + .picker_button(Message::InterfaceText, Some(24)) .width(Length::Fixed(48.0)) .height(Length::Fixed(24.0)), ), @@ -909,7 +921,7 @@ pub fn mode_and_colors() -> Section { .description(&descriptions[11]) .control( page.control_component - .picker_button(Message::ControlComponent) + .picker_button(Message::ControlComponent, Some(24)) .width(Length::Fixed(48.0)) .height(Length::Fixed(24.0)), ), @@ -917,7 +929,7 @@ pub fn mode_and_colors() -> Section { .add( settings::item::builder(&descriptions[12]).control( page.accent_window_hint - .picker_button(Message::AccentWindowHint) + .picker_button(Message::AccentWindowHint, Some(24)) .width(Length::Fixed(48.0)) .height(Length::Fixed(24.0)), ), From a4571011f1f141d64b0b20718646753da0f45840 Mon Sep 17 00:00:00 2001 From: Ashley Wulber Date: Thu, 12 Oct 2023 16:30:33 -0400 Subject: [PATCH 20/27] feat: import / export themes --- Cargo.lock | 93 +++++++++++++++- app/Cargo.toml | 2 + app/src/pages/desktop/appearance.rs | 160 ++++++++++++++++++++++++++-- 3 files changed, 245 insertions(+), 10 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d03b1dac..4aa1ae2e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -178,6 +178,24 @@ dependencies = [ "zbus", ] +[[package]] +name = "ashpd" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3affe251686bd936a0afb74b9693e8bf2f193d51da1b9a45d3f1303a9bd2cc7" +dependencies = [ + "async-std", + "enumflags2", + "futures-channel", + "futures-util", + "once_cell", + "rand", + "serde", + "serde_repr", + "url", + "zbus", +] + [[package]] name = "async-broadcast" version = "0.5.1" @@ -225,6 +243,21 @@ dependencies = [ "futures-lite", ] +[[package]] +name = "async-global-executor" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1b6f5d7df27bd294849f8eec66ecfc63d11814df7a4f5d74168a2394467b776" +dependencies = [ + "async-channel", + "async-executor", + "async-io", + "async-lock", + "blocking", + "futures-lite", + "once_cell", +] + [[package]] name = "async-io" version = "1.13.0" @@ -300,6 +333,32 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "async-std" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62565bb4402e926b29953c785397c6dc0391b7b446e45008b0049eb43cec6f5d" +dependencies = [ + "async-channel", + "async-global-executor", + "async-io", + "async-lock", + "crossbeam-utils", + "futures-channel", + "futures-core", + "futures-io", + "futures-lite", + "gloo-timers", + "kv-log-macro", + "log", + "memchr", + "once_cell", + "pin-project-lite", + "pin-utils", + "slab", + "wasm-bindgen-futures", +] + [[package]] name = "async-task" version = "4.4.1" @@ -874,6 +933,7 @@ version = "0.1.0" dependencies = [ "anyhow", "apply", + "ashpd 0.6.2", "async-channel", "color-eyre", "cosmic-comp-config", @@ -898,6 +958,7 @@ dependencies = [ "notify", "once_cell", "regex", + "ron", "rust-embed", "serde", "slotmap", @@ -1981,6 +2042,18 @@ version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5418c17512bdf42730f9032c74e1ae39afc408745ebb2acf72fbc4691c17945" +[[package]] +name = "gloo-timers" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b995a66bb87bebce9a0f4a95aed01daca4872c050bfcb21653361c03bc35e5c" +dependencies = [ + "futures-channel", + "futures-core", + "js-sys", + "wasm-bindgen", +] + [[package]] name = "glow" version = "0.12.3" @@ -2779,6 +2852,15 @@ dependencies = [ "arrayvec 0.7.4", ] +[[package]] +name = "kv-log-macro" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0de8b303297635ad57c9f5059fd9cee7a47f8e8daa09df0fcd07dd39fb22977f" +dependencies = [ + "log", +] + [[package]] name = "lazy_static" version = "1.4.0" @@ -2803,7 +2885,7 @@ version = "0.1.0" source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#b1cb008d94387dec0006a2a4169e0f912a70d394" dependencies = [ "apply", - "ashpd", + "ashpd 0.5.0", "cosmic-config", "cosmic-theme", "css-color", @@ -2913,6 +2995,9 @@ name = "log" version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +dependencies = [ + "value-bag", +] [[package]] name = "lru" @@ -5109,6 +5194,12 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" +[[package]] +name = "value-bag" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d92ccd67fb88503048c01b59152a04effd0782d035a83a6d256ce6085f08f4a3" + [[package]] name = "vec_map" version = "0.8.2" diff --git a/app/Cargo.toml b/app/Cargo.toml index 87ffe882..876cbea1 100644 --- a/app/Cargo.toml +++ b/app/Cargo.toml @@ -39,6 +39,8 @@ notify = "6.0.0" anyhow = "1.0" image = "0.24.6" serde = { version = "1.0.180", features = ["derive"] } +ashpd = "0.6.2" +ron = "0.8" [dependencies.i18n-embed] version = "0.13.9" diff --git a/app/src/pages/desktop/appearance.rs b/app/src/pages/desktop/appearance.rs index 96fa11fc..16452aa9 100644 --- a/app/src/pages/desktop/appearance.rs +++ b/app/src/pages/desktop/appearance.rs @@ -4,6 +4,7 @@ use std::sync::Arc; use apply::Apply; +use ashpd::desktop::file_chooser::{FileFilter, SelectedFiles}; use cosmic::cosmic_config::{Config, ConfigSet, CosmicConfigEntry}; use cosmic::cosmic_theme::palette::{Srgb, Srgba}; use cosmic::cosmic_theme::{CornerRadii, Theme, ThemeBuilder, ThemeMode}; @@ -21,6 +22,7 @@ use cosmic::widget::{ use cosmic::{Command, Element}; use cosmic_settings_page::Section; use cosmic_settings_page::{self as page, section}; +use ron::ser::PrettyConfig; use slotmap::SlotMap; use tracing::warn; @@ -189,8 +191,14 @@ pub enum Message { ControlComponent(ColorPickerUpdate), CloseRequested(window::Id), Roundness(Roundness), - Import, - Export, + StartImport, + StartExport, + ImportFile(Arc), + ExportFile(Arc), + ExportSuccess, + ImportSuccess(ThemeBuilder), + ImportError, + ExportError, Reset, Left, } @@ -581,14 +589,148 @@ impl Page { crate::Message::SetTheme(cosmic::theme::Theme::custom(Arc::new(new_theme))) }) } - Message::Import => { - // TODO get file from portal - Command::none() + Message::StartImport => Command::perform( + async { + SelectedFiles::open_file() + .modal(true) + .filter(FileFilter::glob(FileFilter::new("ron"), "*.ron")) + .send() + .await? + .response() + }, + |res| { + if let Ok(f) = res { + crate::Message::PageMessage(crate::pages::Message::Appearance( + Message::ImportFile(Arc::new(f)), + )) + } else { + // TODO Error toast? + tracing::error!("failed to select a file for importing a custom theme."); + crate::Message::PageMessage(crate::pages::Message::Appearance( + Message::ImportError, + )) + } + }, + ), + Message::StartExport => { + let is_dark = self.theme_mode.is_dark; + let name = format!("{}.ron", if is_dark { fl!("dark") } else { fl!("light") }); + Command::perform( + async move { + SelectedFiles::save_file() + .modal(true) + .current_name(Some(name.as_str())) + .send() + .await? + .response() + }, + |res| { + if let Ok(f) = res { + crate::Message::PageMessage(crate::pages::Message::Appearance( + Message::ExportFile(Arc::new(f)), + )) + } else { + // TODO Error toast? + tracing::error!( + "failed to select a file for importing a custom theme." + ); + crate::Message::PageMessage(crate::pages::Message::Appearance( + Message::ExportError, + )) + } + }, + ) } - Message::Export => { - // TODO write file using portal + Message::ImportFile(f) => { + let Some(f) = f.uris().get(0) else { + return Command::none(); + }; + if f.scheme() != "file" { + return Command::none(); + } + let Ok(path) = f.to_file_path() else { + return Command::none(); + }; + Command::perform( + async move { tokio::fs::read_to_string(path).await }, + |res| { + if let Some(b) = res.ok().and_then(|s| ron::de::from_str(&s).ok()) { + crate::Message::PageMessage(crate::pages::Message::Appearance( + Message::ImportSuccess(b), + )) + } else { + // TODO Error toast? + tracing::error!("failed to import a file for a custom theme."); + crate::Message::PageMessage(crate::pages::Message::Appearance( + Message::ImportError, + )) + } + }, + ) + } + Message::ExportFile(f) => { + let Some(f) = f.uris().get(0) else { + return Command::none(); + }; + if f.scheme() != "file" { + return Command::none(); + } + let Ok(path) = f.to_file_path() else { + return Command::none(); + }; + let Ok(builder) = ron::ser::to_string_pretty(&self.theme_builder, PrettyConfig::default()) else { + return Command::none(); + }; + Command::perform( + async move { tokio::fs::write(path, builder).await }, + |res| { + if res.is_ok() { + crate::Message::PageMessage(crate::pages::Message::Appearance( + Message::ExportSuccess, + )) + } else { + // TODO Error toast? + tracing::error!( + "failed to select a file for importing a custom theme." + ); + crate::Message::PageMessage(crate::pages::Message::Appearance( + Message::ExportError, + )) + } + }, + ) + } + Message::ImportError => Command::none(), + Message::ExportError => Command::none(), + Message::ExportSuccess => { + tracing::trace!("Export successful"); Command::none() } + Message::ImportSuccess(builder) => { + tracing::trace!("Import successful"); + self.theme_builder = builder; + + if let Some(config) = self.theme_builder_config.as_ref() { + _ = self.theme_builder.write_entry(config); + }; + + let config = if self.theme_mode.is_dark { + Theme::::dark_config() + } else { + Theme::::light_config() + }; + let new_theme = self.theme_builder.clone().build(); + if let Ok(config) = config { + _ = new_theme.write_entry(&config); + } else { + tracing::error!("Failed to get the theme config."); + } + + *self = Self::from((self.theme_mode_config.clone(), self.theme_mode)); + Command::perform(async {}, |_| { + crate::Message::SetTheme(cosmic::theme::Theme::custom(Arc::new(new_theme))) + }) + } }; if theme_builder_needs_update { @@ -727,10 +869,10 @@ fn import_export() -> Section { container( row![ button(text(&descriptions[0])) - .on_press(Message::Import) + .on_press(Message::StartImport) .padding([spacing.space_xxs, spacing.space_xs]), button(text(&descriptions[1])) - .on_press(Message::Export) + .on_press(Message::StartExport) .padding([spacing.space_xxs, spacing.space_xs]) ] .spacing(8.0), From cd4c9cdbf6b1371ef7adffab13a5087fcfd2446a Mon Sep 17 00:00:00 2001 From: Ashley Wulber Date: Fri, 13 Oct 2023 12:37:53 -0400 Subject: [PATCH 21/27] refactor: defaults for most color pickers and toggle for window hint --- app/src/pages/desktop/appearance.rs | 159 +++++++++++++++++++--------- i18n/en/cosmic_settings.ftl | 3 +- 2 files changed, 112 insertions(+), 50 deletions(-) diff --git a/app/src/pages/desktop/appearance.rs b/app/src/pages/desktop/appearance.rs index 16452aa9..06e2a84c 100644 --- a/app/src/pages/desktop/appearance.rs +++ b/app/src/pages/desktop/appearance.rs @@ -6,14 +6,14 @@ use std::sync::Arc; use apply::Apply; use ashpd::desktop::file_chooser::{FileFilter, SelectedFiles}; use cosmic::cosmic_config::{Config, ConfigSet, CosmicConfigEntry}; -use cosmic::cosmic_theme::palette::{Srgb, Srgba}; +use cosmic::cosmic_theme::palette::{self, FromColor, Hsv, Hsva, Srgb, Srgba}; use cosmic::cosmic_theme::{CornerRadii, Theme, ThemeBuilder, ThemeMode}; use cosmic::iced::wayland::actions::window::SctkWindowSettings; use cosmic::iced::widget::{column, row}; use cosmic::iced::window; use cosmic::iced_core::{layout, Color, Length}; use cosmic::iced_sctk::commands::window::{close_window, get_window}; -use cosmic::iced_widget::scrollable; +use cosmic::iced_widget::{scrollable, toggler}; use cosmic::widget::icon::{from_name, icon}; use cosmic::widget::{ button, color_picker::ColorPickerUpdate, container, header_bar, horizontal_space, settings, @@ -48,6 +48,7 @@ pub struct Page { control_component: ColorPickerModel, active_dialog: Option, roundness: Roundness, + no_custom_window_hint: bool, theme_mode: ThemeMode, theme_builder: ThemeBuilder, @@ -77,51 +78,33 @@ impl Default for Page { } } -impl From<(Option, ThemeMode)> for Page { - fn from((theme_mode_config, theme_mode): (Option, ThemeMode)) -> Self { - let theme_builder_config = if theme_mode.is_dark { - ThemeBuilder::dark_config() +impl From<(Option, ThemeMode, Option, ThemeBuilder)> for Page { + fn from( + (theme_mode_config, theme_mode, theme_builder_config, theme_builder): ( + Option, + ThemeMode, + Option, + ThemeBuilder, + ), + ) -> Self { + let theme: Theme = if theme_mode.is_dark { + Theme::dark_default() } else { - ThemeBuilder::light_config() - } - .ok(); - let theme_builder = theme_builder_config.as_ref().map_or_else( - || { - if theme_mode.is_dark { - ThemeBuilder::dark() - } else { - ThemeBuilder::light() - } - }, - |c| match ThemeBuilder::get_entry(c) { - Ok(t) => t, - Err((errors, t)) => { - for e in errors { - tracing::error!("{e}"); - } - t - } - }, - ); + Theme::light_default() + }; let custom_accent = theme_builder.accent.filter(|c| { - let palette = if theme_mode.is_dark { - Theme::dark_default().palette - } else { - Theme::light_default().palette - }; let c = Srgba::new(c.red, c.green, c.blue, 1.0); - c != palette.accent_blue - && c != palette.accent_green - && c != palette.accent_indigo - && c != palette.accent_orange - && c != palette.accent_pink - && c != palette.accent_purple - && c != palette.accent_red - && c != palette.accent_warm_grey - && c != palette.accent_yellow + c != theme.palette.accent_blue + && c != theme.palette.accent_green + && c != theme.palette.accent_indigo + && c != theme.palette.accent_orange + && c != theme.palette.accent_pink + && c != theme.palette.accent_purple + && c != theme.palette.accent_red + && c != theme.palette.accent_warm_grey + && c != theme.palette.accent_yellow }); - // TODO fill all these values with the current values Self { can_reset: if theme_mode.is_dark { theme_builder == ThemeBuilder::dark() @@ -138,7 +121,7 @@ impl From<(Option, ThemeMode)> for Page { application_background: ColorPickerModel::new( fl!("hex"), fl!("rgb"), - None, + Some(theme.background.base.into()), theme_builder.bg_color.map(Color::from), ), container_background: ColorPickerModel::new( @@ -150,13 +133,13 @@ impl From<(Option, ThemeMode)> for Page { interface_text: ColorPickerModel::new( fl!("hex"), fl!("rgb"), - None, + Some(theme.background.on.into()), theme_builder.text_tint.map(Color::from), ), control_component: ColorPickerModel::new( fl!("hex"), fl!("rgb"), - None, + Some(theme.palette.neutral_5.into()), theme_builder.neutral_tint.map(Color::from), ), accent_window_hint: ColorPickerModel::new( @@ -165,6 +148,7 @@ impl From<(Option, ThemeMode)> for Page { None, theme_builder.window_hint.map(Color::from), ), + no_custom_window_hint: theme_builder.accent.is_some(), active_dialog: None, theme_mode_config, theme_builder_config, @@ -174,6 +158,42 @@ impl From<(Option, ThemeMode)> for Page { } } +impl From<(Option, ThemeMode)> for Page { + fn from((theme_mode_config, theme_mode): (Option, ThemeMode)) -> Self { + let theme_builder_config = if theme_mode.is_dark { + ThemeBuilder::dark_config() + } else { + ThemeBuilder::light_config() + } + .ok(); + let theme_builder = theme_builder_config.as_ref().map_or_else( + || { + if theme_mode.is_dark { + ThemeBuilder::dark() + } else { + ThemeBuilder::light() + } + }, + |c| match ThemeBuilder::get_entry(c) { + Ok(t) => t, + Err((errors, t)) => { + for e in errors { + tracing::error!("{e}"); + } + t + } + }, + ); + ( + theme_mode_config, + theme_mode, + theme_builder_config, + theme_builder, + ) + .into() + } +} + #[derive(Debug, Clone)] pub enum Message { Entered, @@ -201,6 +221,7 @@ pub enum Message { ExportError, Reset, Left, + UseDefaultWindowHint(bool), } #[derive(Debug, Clone, Copy)] @@ -731,6 +752,38 @@ impl Page { crate::Message::SetTheme(cosmic::theme::Theme::custom(Arc::new(new_theme))) }) } + Message::UseDefaultWindowHint(v) => { + self.no_custom_window_hint = v; + theme_builder_needs_update = true; + let theme: Theme = if self.theme_mode.is_dark { + Theme::dark_default() + } else { + Theme::light_default() + }; + let window_hint = self + .theme_builder + .window_hint + .filter(|c| { + let c = Srgba::new(c.red, c.green, c.blue, 1.0); + !v && c != theme.palette.accent_blue + && c != theme.palette.accent_green + && c != theme.palette.accent_indigo + && c != theme.palette.accent_orange + && c != theme.palette.accent_pink + && c != theme.palette.accent_purple + && c != theme.palette.accent_red + && c != theme.palette.accent_warm_grey + && c != theme.palette.accent_yellow + }) + .unwrap_or( + self.custom_accent + .get_applied_color() + .unwrap_or_default() + .into(), + ); + self.accent_window_hint + .update(ColorPickerUpdate::ActiveColor(Hsv::from_color(window_hint))) + } }; if theme_builder_needs_update { @@ -908,8 +961,9 @@ pub fn mode_and_colors() -> Section { fl!("control-tint"), fl!("control-tint", "desc"), // 12 + fl!("window-hint-accent-toggle"), fl!("window-hint-accent"), - // 13 + // 14 fl!("dark"), fl!("light"), ]) @@ -920,7 +974,7 @@ pub fn mode_and_colors() -> Section { .theme_builder .accent .map_or(palette.accent_blue, Srgba::from); - settings::view_section(§ion.title) + let mut section = settings::view_section(§ion.title) .add( container( row![ @@ -1069,13 +1123,20 @@ pub fn mode_and_colors() -> Section { ), ) .add( - settings::item::builder(&descriptions[12]).control( + settings::item::builder(&descriptions[12]) + .toggler(page.no_custom_window_hint, Message::UseDefaultWindowHint), + ); + if !page.no_custom_window_hint { + section = section.add( + settings::item::builder(&descriptions[13]).control( page.accent_window_hint .picker_button(Message::AccentWindowHint, Some(24)) .width(Length::Fixed(48.0)) .height(Length::Fixed(24.0)), ), - ) + ); + } + section .apply(Element::from) .map(crate::pages::Message::Appearance) }) diff --git a/i18n/en/cosmic_settings.ftl b/i18n/en/cosmic_settings.ftl index f5c05272..7659ab1b 100644 --- a/i18n/en/cosmic_settings.ftl +++ b/i18n/en/cosmic_settings.ftl @@ -29,7 +29,8 @@ text-tint = Interface text tint .desc = Color used to derive interface text colors that have sufficient contrast on various surfaces. control-tint = Control component tint .desc = Used for backgrounds of standard buttons, search inputs, text inputs, and similar components. -window-hint-accent = Use theme accent color as active window hint +window-hint-accent-toggle = Use theme accent color as active window hint +window-hint-accent = Active window hint color dark = Dark light = Light color-picker = Color Picker From 8ffd350f5424ad70229779dfd3126c3401cb270c Mon Sep 17 00:00:00 2001 From: Ashley Wulber Date: Fri, 13 Oct 2023 16:32:25 -0400 Subject: [PATCH 22/27] refactor: use a context drawer for the container background color --- app/src/app.rs | 19 +++++++ app/src/pages/desktop/appearance.rs | 78 +++++++++++++++++++---------- i18n/en/cosmic_settings.ftl | 2 + page/src/binder.rs | 8 +++ page/src/lib.rs | 7 ++- 5 files changed, 86 insertions(+), 28 deletions(-) diff --git a/app/src/app.rs b/app/src/app.rs index c7bab4cf..9e6f49c0 100644 --- a/app/src/app.rs +++ b/app/src/app.rs @@ -54,6 +54,8 @@ pub enum Message { PanelConfig(CosmicPanelConfig), Search(search::Message), SetWindowTitle, + OpenContextDrawer(Cow<'static, str>), + CloseContextDrawer, SetTheme(cosmic::theme::Theme), } @@ -307,6 +309,13 @@ impl cosmic::Application for SettingsApp { } Message::PanelConfig(_) | Message::Search(_) => {} Message::SetTheme(t) => return cosmic::app::command::set_theme(t), + Message::OpenContextDrawer(title) => { + self.core.window.show_context = true; + self.set_context_title(title.to_string()); + } + Message::CloseContextDrawer => { + self.core.window.show_context = false; + } } Command::none() @@ -373,6 +382,16 @@ impl cosmic::Application for SettingsApp { panic!("unknown window ID: {id:?}"); } + + fn context_drawer(&self) -> Option> { + if self.core.window.show_context { + self.pages + .context_drawer(self.active_page) + .map(|e| e.map(Message::PageMessage)) + } else { + None + } + } } impl SettingsApp { diff --git a/app/src/pages/desktop/appearance.rs b/app/src/pages/desktop/appearance.rs index 06e2a84c..da6b665d 100644 --- a/app/src/pages/desktop/appearance.rs +++ b/app/src/pages/desktop/appearance.rs @@ -6,14 +6,14 @@ use std::sync::Arc; use apply::Apply; use ashpd::desktop::file_chooser::{FileFilter, SelectedFiles}; use cosmic::cosmic_config::{Config, ConfigSet, CosmicConfigEntry}; -use cosmic::cosmic_theme::palette::{self, FromColor, Hsv, Hsva, Srgb, Srgba}; +use cosmic::cosmic_theme::palette::{self, FromColor, Hsv, Srgb, Srgba}; use cosmic::cosmic_theme::{CornerRadii, Theme, ThemeBuilder, ThemeMode}; use cosmic::iced::wayland::actions::window::SctkWindowSettings; use cosmic::iced::widget::{column, row}; use cosmic::iced::window; use cosmic::iced_core::{layout, Color, Length}; use cosmic::iced_sctk::commands::window::{close_window, get_window}; -use cosmic::iced_widget::{scrollable, toggler}; +use cosmic::iced_widget::scrollable; use cosmic::widget::icon::{from_name, icon}; use cosmic::widget::{ button, color_picker::ColorPickerUpdate, container, header_bar, horizontal_space, settings, @@ -32,7 +32,6 @@ pub const COLOR_PICKER_DIALOG_ID: window::Id = window::Id(1003); enum NamedColorPicker { CustomAccent, ApplicationBackground, - ContainerBackground, InterfaceText, ControlComponent, AccentWindowHint, @@ -397,12 +396,9 @@ impl Page { Message::ContainerBackground(u) => { let cmd = match &u { ColorPickerUpdate::AppliedColor | ColorPickerUpdate::Reset => { - // close the color picker dialog - // apply changes theme_builder_needs_update = true; - close_window::(COLOR_PICKER_DIALOG_ID) + Command::perform(async {}, |_| crate::app::Message::CloseContextDrawer) } - // TODO apply changes ColorPickerUpdate::ActionFinished => { theme_builder_needs_update = true; _ = self @@ -411,15 +407,11 @@ impl Page { Command::none() } ColorPickerUpdate::Cancel => { - // close the color picker dialog - close_window(COLOR_PICKER_DIALOG_ID) - } - ColorPickerUpdate::ToggleColorPicker => { - // create the color picker dialog - // set the active picker - self.active_dialog = Some(NamedColorPicker::ContainerBackground); - get_window(color_picker_window_settings()) + Command::perform(async {}, |_| crate::app::Message::CloseContextDrawer) } + ColorPickerUpdate::ToggleColorPicker => Command::perform(async {}, |_| { + crate::app::Message::OpenContextDrawer(fl!("container-background").into()) + }), _ => Command::none(), }; Command::batch(vec![ @@ -527,11 +519,6 @@ impl Page { .application_background .update::(ColorPickerUpdate::Cancel); } - Some(NamedColorPicker::ContainerBackground) => { - _ = self - .container_background - .update::(ColorPickerUpdate::Cancel); - } Some(NamedColorPicker::ControlComponent) => { _ = self .control_component @@ -843,9 +830,6 @@ impl Page { Some(NamedColorPicker::ApplicationBackground) => { (&self.application_background, Message::ApplicationBackground) } - Some(NamedColorPicker::ContainerBackground) => { - (&self.container_background, Message::ContainerBackground) - } Some(NamedColorPicker::ControlComponent) => { (&self.control_component, Message::ControlComponent) } @@ -911,6 +895,29 @@ impl page::Page for Page { crate::pages::Message::Appearance(Message::Left) }) } + + fn context_drawer(&self) -> Option> { + Some( + column![ + text(fl!("container-background", "desc-detail")).width(Length::Fill), + self.container_background + .builder(Message::ContainerBackground) + .width(Length::Fixed(248.0)) + .height(Length::Fixed(158.0)) + .reset_label(fl!("container-background", "reset")) + .build( + fl!("recent-colors"), + fl!("copy-to-clipboard"), + fl!("copied-to-clipboard"), + ) + ] + .padding(self.theme_builder.spacing.space_l) + .align_items(cosmic::iced_core::Alignment::Center) + .spacing(self.theme_builder.spacing.space_m) + .apply(Element::from) + .map(crate::pages::Message::Appearance), + ) + } } fn import_export() -> Section { @@ -1096,10 +1103,27 @@ pub fn mode_and_colors() -> Section { settings::item::builder(&descriptions[4]) .description(&descriptions[5]) .control( - page.container_background - .picker_button(Message::ContainerBackground, Some(24)) - .width(Length::Fixed(48.0)) - .height(Length::Fixed(24.0)), + if let Some(c) = page.container_background.get_applied_color() { + container( + color_button( + Some(Message::ContainerBackground( + ColorPickerUpdate::ToggleColorPicker, + )), + c, + true, + ) + .width(Length::Fixed(48.0)) + .height(Length::Fixed(24.0)), + ) + } else { + container( + button::text(fl!("auto")) + .trailing_icon(from_name("go-next-symbolic")) + .on_press(Message::ContainerBackground( + ColorPickerUpdate::ToggleColorPicker, + )), + ) + }, ), ) .add( diff --git a/i18n/en/cosmic_settings.ftl b/i18n/en/cosmic_settings.ftl index 7659ab1b..2da48d58 100644 --- a/i18n/en/cosmic_settings.ftl +++ b/i18n/en/cosmic_settings.ftl @@ -21,6 +21,8 @@ auto-switch = Automatically switch from Light to Dark mode .desc = Switches to Light mode at sunrise accent-color = Accent color app-background = Application or window background +auto = Auto +close = Close container-background = Container background .desc-detail = Container background color is used for navigation sidebar, side drawer, dialogs and similar widgets. By default, it is automatically derived from the Application or window background. .reset = Reset to auto diff --git a/page/src/binder.rs b/page/src/binder.rs index df509002..7abe7239 100644 --- a/page/src/binder.rs +++ b/page/src/binder.rs @@ -4,6 +4,7 @@ use crate::section::{self, Section}; use crate::{Content, Info, Page}; use cosmic::iced_runtime::command::{Action, Command}; +use cosmic::Element; use regex::Regex; use slotmap::{SecondaryMap, SlotMap, SparseSecondaryMap}; use std::{ @@ -135,6 +136,13 @@ impl Binder { page.downcast_ref::

() } + /// Obtain a reference to a page by its type ID. + #[must_use] + pub fn context_drawer(&self, id: crate::Entity) -> Option> { + let page = self.page.get(id)?; + page.context_drawer() + } + /// Obtain a reference to a page by its type ID. #[must_use] pub fn page_mut>(&mut self) -> Option<&mut P> { diff --git a/page/src/lib.rs b/page/src/lib.rs index 29921df4..92afa6e5 100644 --- a/page/src/lib.rs +++ b/page/src/lib.rs @@ -5,7 +5,7 @@ mod binder; pub use binder::{AutoBind, Binder}; mod insert; -use cosmic::Command; +use cosmic::{Command, Element}; use downcast_rs::{impl_downcast, Downcast}; pub use insert::Insert; @@ -39,6 +39,11 @@ pub trait Page: Downcast { None } + #[must_use] + fn context_drawer(&self) -> Option> { + None + } + #[must_use] #[allow(unused)] fn load(&self, page: crate::Entity) -> Option> { From 0ddaf67afa516f3ea8b6de1d1f61e5d168f1655c Mon Sep 17 00:00:00 2001 From: Ashley Wulber Date: Fri, 13 Oct 2023 16:40:21 -0400 Subject: [PATCH 23/27] cleanup(appearance): box ThemeBuilder in Message --- app/src/pages/desktop/appearance.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/pages/desktop/appearance.rs b/app/src/pages/desktop/appearance.rs index da6b665d..40f60581 100644 --- a/app/src/pages/desktop/appearance.rs +++ b/app/src/pages/desktop/appearance.rs @@ -215,7 +215,7 @@ pub enum Message { ImportFile(Arc), ExportFile(Arc), ExportSuccess, - ImportSuccess(ThemeBuilder), + ImportSuccess(Box), ImportError, ExportError, Reset, @@ -664,7 +664,7 @@ impl Page { |res| { if let Some(b) = res.ok().and_then(|s| ron::de::from_str(&s).ok()) { crate::Message::PageMessage(crate::pages::Message::Appearance( - Message::ImportSuccess(b), + Message::ImportSuccess(Box::new(b)), )) } else { // TODO Error toast? @@ -716,7 +716,7 @@ impl Page { } Message::ImportSuccess(builder) => { tracing::trace!("Import successful"); - self.theme_builder = builder; + self.theme_builder = *builder; if let Some(config) = self.theme_builder_config.as_ref() { _ = self.theme_builder.write_entry(config); From d7d6a690d3f7b84f767cee5fe9b5634ed1ae2375 Mon Sep 17 00:00:00 2001 From: Ashley Wulber Date: Fri, 13 Oct 2023 16:41:29 -0400 Subject: [PATCH 24/27] cleanup(appearance): clippy --- app/src/pages/desktop/appearance.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/pages/desktop/appearance.rs b/app/src/pages/desktop/appearance.rs index 40f60581..5a399f1f 100644 --- a/app/src/pages/desktop/appearance.rs +++ b/app/src/pages/desktop/appearance.rs @@ -708,8 +708,8 @@ impl Page { }, ) } - Message::ImportError => Command::none(), - Message::ExportError => Command::none(), + // TODO: error message toast? + Message::ExportError | Message::ImportError => Command::none(), Message::ExportSuccess => { tracing::trace!("Export successful"); Command::none() From 0cb493c3b7672555bd8e14af74862bc39e085af4 Mon Sep 17 00:00:00 2001 From: Ashley Wulber Date: Mon, 16 Oct 2023 16:59:36 -0400 Subject: [PATCH 25/27] fix(appearance): window hint toggle handling --- Cargo.lock | 153 ++++++++++++++-------------- Cargo.toml | 5 - app/src/pages/desktop/appearance.rs | 56 +++++----- 3 files changed, 108 insertions(+), 106 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4aa1ae2e..7a5c64f7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -180,9 +180,9 @@ dependencies = [ [[package]] name = "ashpd" -version = "0.6.2" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3affe251686bd936a0afb74b9693e8bf2f193d51da1b9a45d3f1303a9bd2cc7" +checksum = "cd40a81a15e8f17f4425f55be1fc823de4d65ee23b1599bd6792341ab3f57ede" dependencies = [ "async-std", "enumflags2", @@ -272,7 +272,7 @@ dependencies = [ "log", "parking", "polling 2.8.0", - "rustix 0.37.24", + "rustix 0.37.25", "slab", "socket2 0.4.9", "waker-fn", @@ -300,7 +300,7 @@ dependencies = [ "cfg-if", "event-listener 3.0.0", "futures-lite", - "rustix 0.38.18", + "rustix 0.38.19", "windows-sys 0.48.0", ] @@ -327,7 +327,7 @@ dependencies = [ "cfg-if", "futures-core", "futures-io", - "rustix 0.38.18", + "rustix 0.38.19", "signal-hook-registry", "slab", "windows-sys 0.48.0", @@ -367,9 +367,9 @@ checksum = "b9441c6b2fe128a7c2bf680a44c34d0df31ce09e5b7e401fcca3faa483dbc921" [[package]] name = "async-trait" -version = "0.1.73" +version = "0.1.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0" +checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" dependencies = [ "proc-macro2", "quote", @@ -388,7 +388,7 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f4d45f362125ed144544e57b0ec6de8fd6a296d41a6252fc4a20c0cf12e9ed3a" dependencies = [ - "rustix 0.38.18", + "rustix 0.38.19", "tempfile", "windows-sys 0.48.0", ] @@ -476,9 +476,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" +checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" dependencies = [ "serde", ] @@ -591,10 +591,10 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7b50b5a44d59a98c55a9eeb518f39bf7499ba19fd98ee7d22618687f3f10adbf" dependencies = [ - "bitflags 2.4.0", + "bitflags 2.4.1", "log", "polling 3.2.0", - "rustix 0.38.18", + "rustix 0.38.19", "slab", "thiserror", ] @@ -606,7 +606,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0f0ea9b9476c7fad82841a8dbb380e2eae480c21910feba80725b46931ed8f02" dependencies = [ "calloop 0.12.3", - "rustix 0.38.18", + "rustix 0.38.19", "wayland-backend 0.3.2", "wayland-client 0.31.1", ] @@ -787,18 +787,18 @@ dependencies = [ [[package]] name = "const_format" -version = "0.2.31" +version = "0.2.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c990efc7a285731f9a4378d81aff2f0e85a2c8781a05ef0f8baa8dac54d0ff48" +checksum = "e3a214c7af3d04997541b18d432afaff4c455e79e2029079647e72fc2bd27673" dependencies = [ "const_format_proc_macros", ] [[package]] name = "const_format_proc_macros" -version = "0.2.31" +version = "0.2.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e026b6ce194a874cb9cf32cd5772d1ef9767cc8fcb5765948d74f37a9d8b2bf6" +checksum = "c7f6ff08fd20f4f299298a28e2dfa8a8ba1036e6cd2460ac1de7b425d76f2500" dependencies = [ "proc-macro2", "quote", @@ -892,7 +892,7 @@ dependencies = [ [[package]] name = "cosmic-config" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#b1cb008d94387dec0006a2a4169e0f912a70d394" +source = "git+https://github.com/pop-os/libcosmic#7cc791a3f5c0e54e091cce800a638aa5567055ef" dependencies = [ "atomicwrites", "calloop 0.12.3", @@ -907,7 +907,7 @@ dependencies = [ [[package]] name = "cosmic-config-derive" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#b1cb008d94387dec0006a2a4169e0f912a70d394" +source = "git+https://github.com/pop-os/libcosmic#7cc791a3f5c0e54e091cce800a638aa5567055ef" dependencies = [ "quote", "syn 1.0.109", @@ -933,7 +933,7 @@ version = "0.1.0" dependencies = [ "anyhow", "apply", - "ashpd 0.6.2", + "ashpd 0.6.5", "async-channel", "color-eyre", "cosmic-comp-config", @@ -1043,7 +1043,7 @@ dependencies = [ [[package]] name = "cosmic-theme" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#b1cb008d94387dec0006a2a4169e0f912a70d394" +source = "git+https://github.com/pop-os/libcosmic#7cc791a3f5c0e54e091cce800a638aa5567055ef" dependencies = [ "almost", "cosmic-config", @@ -1619,9 +1619,9 @@ dependencies = [ [[package]] name = "flate2" -version = "1.0.27" +version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6c98ee8095e9d1dcbf2fcc6d95acccb90d1c81db1e44725c6a984b1dbdfb010" +checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" dependencies = [ "crc32fast", "miniz_oxide", @@ -2116,7 +2116,7 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cc11df1ace8e7e564511f53af41f3e42ddc95b56fd07b3f4445d2a6048bc682c" dependencies = [ - "bitflags 2.4.0", + "bitflags 2.4.1", "gpu-descriptor-types", "hashbrown 0.14.1", ] @@ -2127,7 +2127,7 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6bf0b36e6f090b7e1d8a4b49c0cb81c1f8376f72198c65dd3ad9ff3556b8b78c" dependencies = [ - "bitflags 2.4.0", + "bitflags 2.4.1", ] [[package]] @@ -2293,7 +2293,7 @@ dependencies = [ [[package]] name = "iced" version = "0.10.0" -source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#b1cb008d94387dec0006a2a4169e0f912a70d394" +source = "git+https://github.com/pop-os/libcosmic#7cc791a3f5c0e54e091cce800a638aa5567055ef" dependencies = [ "iced_accessibility", "iced_core", @@ -2309,7 +2309,7 @@ dependencies = [ [[package]] name = "iced_accessibility" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#b1cb008d94387dec0006a2a4169e0f912a70d394" +source = "git+https://github.com/pop-os/libcosmic#7cc791a3f5c0e54e091cce800a638aa5567055ef" dependencies = [ "accesskit", "accesskit_unix", @@ -2318,7 +2318,7 @@ dependencies = [ [[package]] name = "iced_core" version = "0.10.0" -source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#b1cb008d94387dec0006a2a4169e0f912a70d394" +source = "git+https://github.com/pop-os/libcosmic#7cc791a3f5c0e54e091cce800a638aa5567055ef" dependencies = [ "bitflags 1.3.2", "iced_accessibility", @@ -2333,7 +2333,7 @@ dependencies = [ [[package]] name = "iced_futures" version = "0.7.0" -source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#b1cb008d94387dec0006a2a4169e0f912a70d394" +source = "git+https://github.com/pop-os/libcosmic#7cc791a3f5c0e54e091cce800a638aa5567055ef" dependencies = [ "futures", "iced_core", @@ -2346,7 +2346,7 @@ dependencies = [ [[package]] name = "iced_graphics" version = "0.9.0" -source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#b1cb008d94387dec0006a2a4169e0f912a70d394" +source = "git+https://github.com/pop-os/libcosmic#7cc791a3f5c0e54e091cce800a638aa5567055ef" dependencies = [ "bitflags 1.3.2", "bytemuck", @@ -2364,7 +2364,7 @@ dependencies = [ [[package]] name = "iced_renderer" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#b1cb008d94387dec0006a2a4169e0f912a70d394" +source = "git+https://github.com/pop-os/libcosmic#7cc791a3f5c0e54e091cce800a638aa5567055ef" dependencies = [ "iced_graphics", "iced_tiny_skia", @@ -2377,7 +2377,7 @@ dependencies = [ [[package]] name = "iced_runtime" version = "0.1.1" -source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#b1cb008d94387dec0006a2a4169e0f912a70d394" +source = "git+https://github.com/pop-os/libcosmic#7cc791a3f5c0e54e091cce800a638aa5567055ef" dependencies = [ "iced_accessibility", "iced_core", @@ -2389,7 +2389,7 @@ dependencies = [ [[package]] name = "iced_sctk" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#b1cb008d94387dec0006a2a4169e0f912a70d394" +source = "git+https://github.com/pop-os/libcosmic#7cc791a3f5c0e54e091cce800a638aa5567055ef" dependencies = [ "enum-repr", "float-cmp", @@ -2413,7 +2413,7 @@ dependencies = [ [[package]] name = "iced_style" version = "0.9.0" -source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#b1cb008d94387dec0006a2a4169e0f912a70d394" +source = "git+https://github.com/pop-os/libcosmic#7cc791a3f5c0e54e091cce800a638aa5567055ef" dependencies = [ "iced_core", "once_cell", @@ -2423,7 +2423,7 @@ dependencies = [ [[package]] name = "iced_tiny_skia" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#b1cb008d94387dec0006a2a4169e0f912a70d394" +source = "git+https://github.com/pop-os/libcosmic#7cc791a3f5c0e54e091cce800a638aa5567055ef" dependencies = [ "bytemuck", "cosmic-text", @@ -2441,7 +2441,7 @@ dependencies = [ [[package]] name = "iced_wgpu" version = "0.11.1" -source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#b1cb008d94387dec0006a2a4169e0f912a70d394" +source = "git+https://github.com/pop-os/libcosmic#7cc791a3f5c0e54e091cce800a638aa5567055ef" dependencies = [ "bitflags 1.3.2", "bytemuck", @@ -2463,7 +2463,7 @@ dependencies = [ [[package]] name = "iced_widget" version = "0.1.3" -source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#b1cb008d94387dec0006a2a4169e0f912a70d394" +source = "git+https://github.com/pop-os/libcosmic#7cc791a3f5c0e54e091cce800a638aa5567055ef" dependencies = [ "iced_renderer", "iced_runtime", @@ -2478,7 +2478,7 @@ dependencies = [ [[package]] name = "iced_winit" version = "0.10.0" -source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#b1cb008d94387dec0006a2a4169e0f912a70d394" +source = "git+https://github.com/pop-os/libcosmic#7cc791a3f5c0e54e091cce800a638aa5567055ef" dependencies = [ "iced_graphics", "iced_runtime", @@ -2757,7 +2757,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ "hermit-abi", - "rustix 0.38.18", + "rustix 0.38.19", "windows-sys 0.48.0", ] @@ -2882,7 +2882,7 @@ checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b" [[package]] name = "libcosmic" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic//?branch=theme-dark-light-switching#b1cb008d94387dec0006a2a4169e0f912a70d394" +source = "git+https://github.com/pop-os/libcosmic#7cc791a3f5c0e54e091cce800a638aa5567055ef" dependencies = [ "apply", "ashpd 0.5.0", @@ -3331,7 +3331,7 @@ version = "6.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6205bd8bb1e454ad2e27422015fb5e4f2bcc7e08fa8f27058670d208324a4d2d" dependencies = [ - "bitflags 2.4.0", + "bitflags 2.4.1", "crossbeam-channel", "filetime", "fsevent-sys", @@ -3806,7 +3806,7 @@ dependencies = [ "cfg-if", "concurrent-queue", "pin-project-lite", - "rustix 0.38.18", + "rustix 0.38.19", "tracing", "windows-sys 0.48.0", ] @@ -4016,9 +4016,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.0" +version = "1.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d119d7c7ca818f8a53c300863d4f87566aac09943aef5b355bb83969dae75d87" +checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" dependencies = [ "aho-corasick", "memchr", @@ -4028,9 +4028,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.1" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "465c6fc0621e4abc4187a2bda0937bfd4f722c2730b29562e19689ea796c9a4b" +checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" dependencies = [ "aho-corasick", "memchr", @@ -4039,9 +4039,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56d84fdd47036b038fc80dd333d10b6aab10d5d31f4a366e20014def75328d33" +checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] name = "renderdoc-sys" @@ -4082,7 +4082,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b91f7eff05f748767f183df4320a63d6936e9c6107d97c9e6bdd9784f4289c94" dependencies = [ "base64", - "bitflags 2.4.0", + "bitflags 2.4.1", "serde", "serde_derive", ] @@ -4154,9 +4154,9 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustix" -version = "0.37.24" +version = "0.37.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4279d76516df406a8bd37e7dff53fd37d1a093f997a3c34a5c21658c126db06d" +checksum = "d4eb579851244c2c03e7c24f501c3432bed80b8f720af1d6e5b0e0f01555a035" dependencies = [ "bitflags 1.3.2", "errno", @@ -4168,11 +4168,11 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.18" +version = "0.38.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a74ee2d7c2581cd139b42447d7d9389b889bdaad3a73f1ebb16f2a3237bb19c" +checksum = "745ecfa778e66b2b63c88a61cb36e0eea109e803b0b86bf9879fbc77c70e86ed" dependencies = [ - "bitflags 2.4.0", + "bitflags 2.4.1", "errno", "libc", "linux-raw-sys 0.4.10", @@ -4268,18 +4268,18 @@ checksum = "1ef965a420fe14fdac7dd018862966a4c14094f900e1650bbc71ddd7d580c8af" [[package]] name = "serde" -version = "1.0.188" +version = "1.0.189" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf9e0fcba69a370eed61bcf2b728575f726b50b55cba78064753d708ddc7549e" +checksum = "8e422a44e74ad4001bdc8eede9a4570ab52f71190e9c076d14369f38b9200537" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.188" +version = "1.0.189" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" +checksum = "1e48d1f918009ce3145511378cf68d613e3b3d9137d67272562080d68a2b32d5" dependencies = [ "proc-macro2", "quote", @@ -4436,7 +4436,7 @@ name = "smithay-client-toolkit" version = "0.17.0" source = "git+https://github.com/smithay/client-toolkit//?rev=dc8c4a0#dc8c4a035128208af65141fe12142a1dbc4a32bb" dependencies = [ - "bitflags 2.4.0", + "bitflags 2.4.1", "bytemuck", "calloop 0.12.3", "calloop-wayland-source", @@ -4654,7 +4654,7 @@ dependencies = [ [[package]] name = "taffy" version = "0.3.11" -source = "git+https://github.com/DioxusLabs/taffy#9e62e959cb49f18f8b452f0dd1a9c7adb8dd02cb" +source = "git+https://github.com/DioxusLabs/taffy#daa07e0f4e3e009f5b0c11ada5df9785efd4b2c2" dependencies = [ "arrayvec 0.7.4", "grid", @@ -4677,7 +4677,7 @@ dependencies = [ "cfg-if", "fastrand 2.0.1", "redox_syscall 0.3.5", - "rustix 0.38.18", + "rustix 0.38.19", "windows-sys 0.48.0", ] @@ -4890,11 +4890,10 @@ dependencies = [ [[package]] name = "tracing" -version = "0.1.37" +version = "0.1.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" +checksum = "ee2ef2af84856a50c1d430afce2fdded0a4ec7eda868db86409b4543df0797f9" dependencies = [ - "cfg-if", "pin-project-lite", "tracing-attributes", "tracing-core", @@ -4902,9 +4901,9 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.26" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", @@ -4913,9 +4912,9 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.31" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ "once_cell", "valuable", @@ -5378,7 +5377,7 @@ version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ca7d52347346f5473bf2f56705f360e8440873052e575e55890c4fa57843ed3" dependencies = [ - "bitflags 2.4.0", + "bitflags 2.4.1", "nix 0.26.4", "wayland-backend 0.3.2", "wayland-scanner 0.31.0", @@ -5402,7 +5401,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "625c5029dbd43d25e6aa9615e88b829a5cad13b2819c4ae129fdbb7c31ab4c7e" dependencies = [ - "bitflags 2.4.0", + "bitflags 2.4.1", "cursor-icon", "wayland-backend 0.3.2", ] @@ -5460,7 +5459,7 @@ version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e253d7107ba913923dc253967f35e8561a3c65f914543e46843c88ddd729e21c" dependencies = [ - "bitflags 2.4.0", + "bitflags 2.4.1", "wayland-backend 0.3.2", "wayland-client 0.31.1", "wayland-scanner 0.31.0", @@ -5486,7 +5485,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad1f61b76b6c2d8742e10f9ba5c3737f6530b4c243132c2a2ccc8aa96fe25cd6" dependencies = [ - "bitflags 2.4.0", + "bitflags 2.4.1", "wayland-backend 0.3.2", "wayland-client 0.31.1", "wayland-protocols 0.31.0", @@ -5622,7 +5621,7 @@ checksum = "8f478237b4bf0d5b70a39898a66fa67ca3a007d79f2520485b8b0c3dfc46f8c2" dependencies = [ "arrayvec 0.7.4", "bit-vec", - "bitflags 2.4.0", + "bitflags 2.4.1", "codespan-reporting", "log", "naga", @@ -5647,7 +5646,7 @@ dependencies = [ "arrayvec 0.7.4", "ash", "bit-set", - "bitflags 2.4.0", + "bitflags 2.4.1", "block", "core-graphics-types", "d3d12", @@ -5685,7 +5684,7 @@ version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d0c153280bb108c2979eb5c7391cb18c56642dd3c072e55f52065e13e2a1252a" dependencies = [ - "bitflags 2.4.0", + "bitflags 2.4.1", "js-sys", "web-sys", ] @@ -5983,9 +5982,9 @@ dependencies = [ [[package]] name = "winnow" -version = "0.5.16" +version = "0.5.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "037711d82167854aff2018dfd193aa0fef5370f456732f0d5a0c59b0f1b4b907" +checksum = "a3b801d0e0a6726477cc207f60162da452f3a95adb368399bef20a946e06f65c" dependencies = [ "memchr", ] diff --git a/Cargo.toml b/Cargo.toml index 9fc3ccb4..2524d38f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,12 +7,9 @@ git = "https://github.com/pop-os/libcosmic" [workspace.dependencies.libcosmic] git = "https://github.com/pop-os/libcosmic" -branch = "theme-dark-light-switching" -# git = "https://github.com/pop-os/libcosmic" features = ["debug", "wayland", "tokio"] [workspace.dependencies.cosmic-config] -branch = "theme-dark-light-switching" git = "https://github.com/pop-os/libcosmic" [workspace.dependencies.cosmic-bg-config] @@ -28,8 +25,6 @@ git = "https://github.com/pop-os/cosmic-panel" [patch."https://github.com/pop-os/libcosmic"] # libcosmic = { path = "../libcosmic" } # cosmic-config = { path = "../libcosmic/cosmic-config" } -libcosmic = { git = "https://github.com/pop-os/libcosmic//", branch = "theme-dark-light-switching" } -cosmic-config = { git = "https://github.com/pop-os/libcosmic//", branch = "theme-dark-light-switching" } [patch."https://github.com/Smithay/client-toolkit"] sctk = { git = "https://github.com/smithay/client-toolkit//", package = "smithay-client-toolkit", rev = "dc8c4a0"} diff --git a/app/src/pages/desktop/appearance.rs b/app/src/pages/desktop/appearance.rs index 5a399f1f..35a24e99 100644 --- a/app/src/pages/desktop/appearance.rs +++ b/app/src/pages/desktop/appearance.rs @@ -747,29 +747,33 @@ impl Page { } else { Theme::light_default() }; - let window_hint = self - .theme_builder - .window_hint - .filter(|c| { - let c = Srgba::new(c.red, c.green, c.blue, 1.0); - !v && c != theme.palette.accent_blue - && c != theme.palette.accent_green - && c != theme.palette.accent_indigo - && c != theme.palette.accent_orange - && c != theme.palette.accent_pink - && c != theme.palette.accent_purple - && c != theme.palette.accent_red - && c != theme.palette.accent_warm_grey - && c != theme.palette.accent_yellow - }) - .unwrap_or( - self.custom_accent - .get_applied_color() - .unwrap_or_default() - .into(), - ); - self.accent_window_hint - .update(ColorPickerUpdate::ActiveColor(Hsv::from_color(window_hint))) + if !v { + let window_hint = self + .theme_builder + .window_hint + .filter(|c| { + let c = Srgba::new(c.red, c.green, c.blue, 1.0); + c != theme.palette.accent_blue + && c != theme.palette.accent_green + && c != theme.palette.accent_indigo + && c != theme.palette.accent_orange + && c != theme.palette.accent_pink + && c != theme.palette.accent_purple + && c != theme.palette.accent_red + && c != theme.palette.accent_warm_grey + && c != theme.palette.accent_yellow + }) + .unwrap_or( + self.custom_accent + .get_applied_color() + .unwrap_or_default() + .into(), + ); + _ = self.accent_window_hint.update::( + ColorPickerUpdate::ActiveColor(Hsv::from_color(window_hint)), + ) + }; + Command::none() } }; @@ -788,7 +792,11 @@ impl Page { .map(Srgba::from); theme_builder.text_tint = self.interface_text.get_applied_color().map(Srgb::from); theme_builder.neutral_tint = self.control_component.get_applied_color().map(Srgb::from); - theme_builder.window_hint = self.accent_window_hint.get_applied_color().map(Srgb::from); + theme_builder.window_hint = if self.no_custom_window_hint { + None + } else { + self.accent_window_hint.get_applied_color().map(Srgb::from) + }; _ = theme_builder.write_entry(config); From 7f74773b24af66854e7568c11dc1f267c35272f9 Mon Sep 17 00:00:00 2001 From: Ashley Wulber Date: Tue, 17 Oct 2023 10:06:36 -0400 Subject: [PATCH 26/27] chore: more entries for the default schema --- .../com.system76.CosmicTheme.Dark.Builder/v1/active_hint | 1 + .../default_schema/com.system76.CosmicTheme.Dark.Builder/v1/gaps | 1 + .../com.system76.CosmicTheme.Dark.Builder/v1/is_frosted | 1 + .../com.system76.CosmicTheme.Dark.Builder/v1/window_hint | 1 + .../com.system76.CosmicTheme.Dark/v1/accent_button | 1 + .../default_schema/com.system76.CosmicTheme.Dark/v1/active_hint | 1 + resources/default_schema/com.system76.CosmicTheme.Dark/v1/button | 1 + .../com.system76.CosmicTheme.Dark/v1/destructive_button | 1 + resources/default_schema/com.system76.CosmicTheme.Dark/v1/gaps | 1 + .../default_schema/com.system76.CosmicTheme.Dark/v1/icon_button | 1 + .../default_schema/com.system76.CosmicTheme.Dark/v1/link_button | 1 + .../com.system76.CosmicTheme.Dark/v1/success_button | 1 + .../default_schema/com.system76.CosmicTheme.Dark/v1/text_button | 1 + .../com.system76.CosmicTheme.Dark/v1/warning_button | 1 + .../default_schema/com.system76.CosmicTheme.Dark/v1/window_hint | 1 + .../com.system76.CosmicTheme.Light.Builder/v1/active_hint | 1 + .../com.system76.CosmicTheme.Light.Builder/v1/gaps | 1 + .../com.system76.CosmicTheme.Light.Builder/v1/is_frosted | 1 + .../com.system76.CosmicTheme.Light.Builder/v1/window_hint | 1 + .../com.system76.CosmicTheme.Light/v1/accent_button | 1 + .../default_schema/com.system76.CosmicTheme.Light/v1/active_hint | 1 + .../default_schema/com.system76.CosmicTheme.Light/v1/button | 1 + .../com.system76.CosmicTheme.Light/v1/destructive_button | 1 + resources/default_schema/com.system76.CosmicTheme.Light/v1/gaps | 1 + .../default_schema/com.system76.CosmicTheme.Light/v1/icon_button | 1 + .../default_schema/com.system76.CosmicTheme.Light/v1/link_button | 1 + .../com.system76.CosmicTheme.Light/v1/success_button | 1 + .../default_schema/com.system76.CosmicTheme.Light/v1/text_button | 1 + .../com.system76.CosmicTheme.Light/v1/warning_button | 1 + .../default_schema/com.system76.CosmicTheme.Light/v1/window_hint | 1 + 30 files changed, 30 insertions(+) create mode 100644 resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v1/active_hint create mode 100644 resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v1/gaps create mode 100644 resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v1/is_frosted create mode 100644 resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v1/window_hint create mode 100644 resources/default_schema/com.system76.CosmicTheme.Dark/v1/accent_button create mode 100644 resources/default_schema/com.system76.CosmicTheme.Dark/v1/active_hint create mode 100644 resources/default_schema/com.system76.CosmicTheme.Dark/v1/button create mode 100644 resources/default_schema/com.system76.CosmicTheme.Dark/v1/destructive_button create mode 100644 resources/default_schema/com.system76.CosmicTheme.Dark/v1/gaps create mode 100644 resources/default_schema/com.system76.CosmicTheme.Dark/v1/icon_button create mode 100644 resources/default_schema/com.system76.CosmicTheme.Dark/v1/link_button create mode 100644 resources/default_schema/com.system76.CosmicTheme.Dark/v1/success_button create mode 100644 resources/default_schema/com.system76.CosmicTheme.Dark/v1/text_button create mode 100644 resources/default_schema/com.system76.CosmicTheme.Dark/v1/warning_button create mode 100644 resources/default_schema/com.system76.CosmicTheme.Dark/v1/window_hint create mode 100644 resources/default_schema/com.system76.CosmicTheme.Light.Builder/v1/active_hint create mode 100644 resources/default_schema/com.system76.CosmicTheme.Light.Builder/v1/gaps create mode 100644 resources/default_schema/com.system76.CosmicTheme.Light.Builder/v1/is_frosted create mode 100644 resources/default_schema/com.system76.CosmicTheme.Light.Builder/v1/window_hint create mode 100644 resources/default_schema/com.system76.CosmicTheme.Light/v1/accent_button create mode 100644 resources/default_schema/com.system76.CosmicTheme.Light/v1/active_hint create mode 100644 resources/default_schema/com.system76.CosmicTheme.Light/v1/button create mode 100644 resources/default_schema/com.system76.CosmicTheme.Light/v1/destructive_button create mode 100644 resources/default_schema/com.system76.CosmicTheme.Light/v1/gaps create mode 100644 resources/default_schema/com.system76.CosmicTheme.Light/v1/icon_button create mode 100644 resources/default_schema/com.system76.CosmicTheme.Light/v1/link_button create mode 100644 resources/default_schema/com.system76.CosmicTheme.Light/v1/success_button create mode 100644 resources/default_schema/com.system76.CosmicTheme.Light/v1/text_button create mode 100644 resources/default_schema/com.system76.CosmicTheme.Light/v1/warning_button create mode 100644 resources/default_schema/com.system76.CosmicTheme.Light/v1/window_hint diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v1/active_hint b/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v1/active_hint new file mode 100644 index 00000000..bf0d87ab --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v1/active_hint @@ -0,0 +1 @@ +4 \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v1/gaps b/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v1/gaps new file mode 100644 index 00000000..095bb991 --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v1/gaps @@ -0,0 +1 @@ +(0,4) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v1/is_frosted b/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v1/is_frosted new file mode 100644 index 00000000..02e4a84d --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v1/is_frosted @@ -0,0 +1 @@ +false \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v1/window_hint b/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v1/window_hint new file mode 100644 index 00000000..4af18322 --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Dark.Builder/v1/window_hint @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark/v1/accent_button b/resources/default_schema/com.system76.CosmicTheme.Dark/v1/accent_button new file mode 100644 index 00000000..3db36055 --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Dark/v1/accent_button @@ -0,0 +1 @@ +(base:(red:0.5803922,green:0.92156863,blue:0.92156863,alpha:1.0),hover:(red:0.38039216,green:0.5509804,blue:0.5509804,alpha:1.0),pressed:(red:0.33333334,green:0.50392157,blue:0.50392157,alpha:1.0),selected:(red:0.38039216,green:0.5509804,blue:0.5509804,alpha:1.0),selected_text:(red:0.5803922,green:0.92156863,blue:0.92156863,alpha:1.0),focus:(red:0.5803922,green:0.92156863,blue:0.92156863,alpha:1.0),divider:(red:0.105882354,green:0.105882354,blue:0.105882354,alpha:1.0),on:(red:0.0,green:0.0,blue:0.0,alpha:1.0),disabled:(red:0.5803922,green:0.92156863,blue:0.92156863,alpha:1.0),on_disabled:(red:0.0,green:0.0,blue:0.0,alpha:0.5),border:(red:0.5803922,green:0.92156863,blue:0.92156863,alpha:1.0),disabled_border:(red:0.5803922,green:0.92156863,blue:0.92156863,alpha:0.5)) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark/v1/active_hint b/resources/default_schema/com.system76.CosmicTheme.Dark/v1/active_hint new file mode 100644 index 00000000..bf0d87ab --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Dark/v1/active_hint @@ -0,0 +1 @@ +4 \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark/v1/button b/resources/default_schema/com.system76.CosmicTheme.Dark/v1/button new file mode 100644 index 00000000..fe308358 --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Dark/v1/button @@ -0,0 +1 @@ +(base:(red:0.67058825,green:0.67058825,blue:0.67058825,alpha:0.25),hover:(red:0.22431374,green:0.22431374,blue:0.22431374,alpha:0.625),pressed:(red:0.1772549,green:0.1772549,blue:0.1772549,alpha:0.625),selected:(red:0.22431374,green:0.22431374,blue:0.22431374,alpha:0.625),selected_text:(red:0.5803922,green:0.92156863,blue:0.92156863,alpha:1.0),focus:(red:0.5803922,green:0.92156863,blue:0.92156863,alpha:1.0),divider:(red:0.7532969,green:0.7532969,blue:0.75329685,alpha:0.2),on:(red:0.7532969,green:0.7532969,blue:0.75329685,alpha:1.0),disabled:(red:0.51056147,green:0.51056147,blue:0.51056147,alpha:0.34375),on_disabled:(red:0.5107661,green:0.5107661,blue:0.5107661,alpha:0.625),border:(red:0.7764706,green:0.7764706,blue:0.7764706,alpha:1.0),disabled_border:(red:0.7764706,green:0.7764706,blue:0.7764706,alpha:0.5)) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark/v1/destructive_button b/resources/default_schema/com.system76.CosmicTheme.Dark/v1/destructive_button new file mode 100644 index 00000000..d839996a --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Dark/v1/destructive_button @@ -0,0 +1 @@ +(base:(red:1.0,green:0.70980394,blue:0.70980394,alpha:1.0),hover:(red:0.5901961,green:0.44509804,blue:0.44509804,alpha:1.0),pressed:(red:0.54313725,green:0.39803922,blue:0.39803922,alpha:1.0),selected:(red:0.5901961,green:0.44509804,blue:0.44509804,alpha:1.0),selected_text:(red:0.5803922,green:0.92156863,blue:0.92156863,alpha:1.0),focus:(red:0.5803922,green:0.92156863,blue:0.92156863,alpha:1.0),divider:(red:0.105882354,green:0.105882354,blue:0.105882354,alpha:1.0),on:(red:0.0,green:0.0,blue:0.0,alpha:1.0),disabled:(red:1.0,green:0.70980394,blue:0.70980394,alpha:1.0),on_disabled:(red:0.0,green:0.0,blue:0.0,alpha:0.5),border:(red:1.0,green:0.70980394,blue:0.70980394,alpha:1.0),disabled_border:(red:1.0,green:0.70980394,blue:0.70980394,alpha:0.5)) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark/v1/gaps b/resources/default_schema/com.system76.CosmicTheme.Dark/v1/gaps new file mode 100644 index 00000000..095bb991 --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Dark/v1/gaps @@ -0,0 +1 @@ +(0,4) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark/v1/icon_button b/resources/default_schema/com.system76.CosmicTheme.Dark/v1/icon_button new file mode 100644 index 00000000..00ba3e01 --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Dark/v1/icon_button @@ -0,0 +1 @@ +(base:(red:0.0,green:0.0,blue:0.0,alpha:0.0),hover:(red:0.09019608,green:0.09019608,blue:0.09019608,alpha:0.5),pressed:(red:0.043137256,green:0.043137256,blue:0.043137256,alpha:0.5),selected:(red:0.09019608,green:0.09019608,blue:0.09019608,alpha:0.5),selected_text:(red:0.5803922,green:0.92156863,blue:0.92156863,alpha:1.0),focus:(red:0.5803922,green:0.92156863,blue:0.92156863,alpha:1.0),divider:(red:0.7764706,green:0.7764706,blue:0.7764706,alpha:0.2),on:(red:0.7764706,green:0.7764706,blue:0.7764706,alpha:1.0),disabled:(red:0.0,green:0.0,blue:0.0,alpha:0.0),on_disabled:(red:0.3882353,green:0.3882353,blue:0.3882353,alpha:0.5),border:(red:0.7764706,green:0.7764706,blue:0.7764706,alpha:1.0),disabled_border:(red:0.7764706,green:0.7764706,blue:0.7764706,alpha:0.5)) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark/v1/link_button b/resources/default_schema/com.system76.CosmicTheme.Dark/v1/link_button new file mode 100644 index 00000000..7ad508d8 --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Dark/v1/link_button @@ -0,0 +1 @@ +(base:(red:0.0,green:0.0,blue:0.0,alpha:0.0),hover:(red:0.0,green:0.0,blue:0.0,alpha:0.0),pressed:(red:0.0,green:0.0,blue:0.0,alpha:0.0),selected:(red:0.0,green:0.0,blue:0.0,alpha:0.0),selected_text:(red:0.5803922,green:0.92156863,blue:0.92156863,alpha:1.0),focus:(red:0.5803922,green:0.92156863,blue:0.92156863,alpha:1.0),divider:(red:0.5803922,green:0.92156863,blue:0.92156863,alpha:0.2),on:(red:0.5803922,green:0.92156863,blue:0.92156863,alpha:1.0),disabled:(red:0.0,green:0.0,blue:0.0,alpha:0.0),on_disabled:(red:0.2901961,green:0.46078432,blue:0.46078432,alpha:0.5),border:(red:0.7764706,green:0.7764706,blue:0.7764706,alpha:1.0),disabled_border:(red:0.7764706,green:0.7764706,blue:0.7764706,alpha:0.5)) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark/v1/success_button b/resources/default_schema/com.system76.CosmicTheme.Dark/v1/success_button new file mode 100644 index 00000000..f40408bd --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Dark/v1/success_button @@ -0,0 +1 @@ +(base:(red:0.6745098,green:0.96862745,blue:0.8235294,alpha:1.0),hover:(red:0.42745098,green:0.5745098,blue:0.5019608,alpha:1.0),pressed:(red:0.38039216,green:0.527451,blue:0.45490196,alpha:1.0),selected:(red:0.42745098,green:0.5745098,blue:0.5019608,alpha:1.0),selected_text:(red:0.5803922,green:0.92156863,blue:0.92156863,alpha:1.0),focus:(red:0.5803922,green:0.92156863,blue:0.92156863,alpha:1.0),divider:(red:0.105882354,green:0.105882354,blue:0.105882354,alpha:1.0),on:(red:0.0,green:0.0,blue:0.0,alpha:1.0),disabled:(red:0.6745098,green:0.96862745,blue:0.8235294,alpha:1.0),on_disabled:(red:0.0,green:0.0,blue:0.0,alpha:0.5),border:(red:0.6745098,green:0.96862745,blue:0.8235294,alpha:1.0),disabled_border:(red:0.6745098,green:0.96862745,blue:0.8235294,alpha:0.5)) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark/v1/text_button b/resources/default_schema/com.system76.CosmicTheme.Dark/v1/text_button new file mode 100644 index 00000000..ca3ba707 --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Dark/v1/text_button @@ -0,0 +1 @@ +(base:(red:0.0,green:0.0,blue:0.0,alpha:0.0),hover:(red:0.09019608,green:0.09019608,blue:0.09019608,alpha:0.5),pressed:(red:0.043137256,green:0.043137256,blue:0.043137256,alpha:0.5),selected:(red:0.09019608,green:0.09019608,blue:0.09019608,alpha:0.5),selected_text:(red:0.5803922,green:0.92156863,blue:0.92156863,alpha:1.0),focus:(red:0.5803922,green:0.92156863,blue:0.92156863,alpha:1.0),divider:(red:0.5803922,green:0.92156863,blue:0.92156863,alpha:0.2),on:(red:0.5803922,green:0.92156863,blue:0.92156863,alpha:1.0),disabled:(red:0.0,green:0.0,blue:0.0,alpha:0.0),on_disabled:(red:0.2901961,green:0.46078432,blue:0.46078432,alpha:0.5),border:(red:0.7764706,green:0.7764706,blue:0.7764706,alpha:1.0),disabled_border:(red:0.7764706,green:0.7764706,blue:0.7764706,alpha:0.5)) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark/v1/warning_button b/resources/default_schema/com.system76.CosmicTheme.Dark/v1/warning_button new file mode 100644 index 00000000..4e98e1bb --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Dark/v1/warning_button @@ -0,0 +1 @@ +(base:(red:1.0,green:0.94509804,blue:0.61960787,alpha:1.0),hover:(red:0.5901961,green:0.5627451,blue:0.4,alpha:1.0),pressed:(red:0.54313725,green:0.5156863,blue:0.3529412,alpha:1.0),selected:(red:0.5901961,green:0.5627451,blue:0.4,alpha:1.0),selected_text:(red:0.5803922,green:0.92156863,blue:0.92156863,alpha:1.0),focus:(red:0.5803922,green:0.92156863,blue:0.92156863,alpha:1.0),divider:(red:1.0,green:1.0,blue:1.0,alpha:1.0),on:(red:0.0,green:0.0,blue:0.0,alpha:1.0),disabled:(red:1.0,green:0.94509804,blue:0.61960787,alpha:1.0),on_disabled:(red:0.0,green:0.0,blue:0.0,alpha:0.5),border:(red:1.0,green:0.94509804,blue:0.61960787,alpha:1.0),disabled_border:(red:1.0,green:0.94509804,blue:0.61960787,alpha:0.5)) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Dark/v1/window_hint b/resources/default_schema/com.system76.CosmicTheme.Dark/v1/window_hint new file mode 100644 index 00000000..4af18322 --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Dark/v1/window_hint @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v1/active_hint b/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v1/active_hint new file mode 100644 index 00000000..bf0d87ab --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v1/active_hint @@ -0,0 +1 @@ +4 \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v1/gaps b/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v1/gaps new file mode 100644 index 00000000..095bb991 --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v1/gaps @@ -0,0 +1 @@ +(0,4) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v1/is_frosted b/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v1/is_frosted new file mode 100644 index 00000000..02e4a84d --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v1/is_frosted @@ -0,0 +1 @@ +false \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v1/window_hint b/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v1/window_hint new file mode 100644 index 00000000..4af18322 --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Light.Builder/v1/window_hint @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light/v1/accent_button b/resources/default_schema/com.system76.CosmicTheme.Light/v1/accent_button new file mode 100644 index 00000000..a315f703 --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Light/v1/accent_button @@ -0,0 +1 @@ +(base:(red:0.0,green:0.28627452,blue:0.42745098,alpha:1.0),hover:(red:0.30980393,green:0.45294118,blue:0.5235294,alpha:1.0),pressed:(red:0.37254903,green:0.5156863,blue:0.5862745,alpha:1.0),selected:(red:0.30980393,green:0.45294118,blue:0.5235294,alpha:1.0),selected_text:(red:0.0,green:0.28627452,blue:0.42745098,alpha:1.0),focus:(red:0.0,green:0.28627452,blue:0.42745098,alpha:1.0),divider:(red:0.8862745,green:0.8862745,blue:0.8862745,alpha:1.0),on:(red:1.0,green:1.0,blue:1.0,alpha:1.0),disabled:(red:0.0,green:0.28627452,blue:0.42745098,alpha:1.0),on_disabled:(red:1.0,green:1.0,blue:1.0,alpha:0.5),border:(red:0.0,green:0.28627452,blue:0.42745098,alpha:1.0),disabled_border:(red:0.0,green:0.28627452,blue:0.42745098,alpha:0.5)) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light/v1/active_hint b/resources/default_schema/com.system76.CosmicTheme.Light/v1/active_hint new file mode 100644 index 00000000..bf0d87ab --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Light/v1/active_hint @@ -0,0 +1 @@ +4 \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light/v1/button b/resources/default_schema/com.system76.CosmicTheme.Light/v1/button new file mode 100644 index 00000000..036adcf5 --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Light/v1/button @@ -0,0 +1 @@ +(base:(red:0.2784314,green:0.2784314,blue:0.2784314,alpha:0.25),hover:(red:0.3654902,green:0.3654902,blue:0.3654902,alpha:0.625),pressed:(red:0.4282353,green:0.4282353,blue:0.4282353,alpha:0.625),selected:(red:0.3654902,green:0.3654902,blue:0.3654902,alpha:0.625),selected_text:(red:0.0,green:0.28627452,blue:0.42745098,alpha:1.0),focus:(red:0.0,green:0.28627452,blue:0.42745098,alpha:1.0),divider:(red:0.17235574,green:0.1723558,blue:0.17235562,alpha:0.2),on:(red:0.17235574,green:0.1723558,blue:0.17235562,alpha:1.0),disabled:(red:0.21198754,green:0.21198754,blue:0.21198754,alpha:0.34375),on_disabled:(red:0.14186415,green:0.14186418,blue:0.14186409,alpha:0.625),border:(red:0.1882353,green:0.1882353,blue:0.1882353,alpha:1.0),disabled_border:(red:0.1882353,green:0.1882353,blue:0.1882353,alpha:0.5)) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light/v1/destructive_button b/resources/default_schema/com.system76.CosmicTheme.Light/v1/destructive_button new file mode 100644 index 00000000..62435f3f --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Light/v1/destructive_button @@ -0,0 +1 @@ +(base:(red:0.627451,green:0.14509805,blue:0.16862746,alpha:1.0),hover:(red:0.62352943,green:0.38235295,blue:0.39411765,alpha:1.0),pressed:(red:0.6862745,green:0.44509804,blue:0.45686275,alpha:1.0),selected:(red:0.62352943,green:0.38235295,blue:0.39411765,alpha:1.0),selected_text:(red:0.0,green:0.28627452,blue:0.42745098,alpha:1.0),focus:(red:0.0,green:0.28627452,blue:0.42745098,alpha:1.0),divider:(red:0.8862745,green:0.8862745,blue:0.8862745,alpha:1.0),on:(red:1.0,green:1.0,blue:1.0,alpha:1.0),disabled:(red:0.627451,green:0.14509805,blue:0.16862746,alpha:1.0),on_disabled:(red:1.0,green:1.0,blue:1.0,alpha:0.5),border:(red:0.627451,green:0.14509805,blue:0.16862746,alpha:1.0),disabled_border:(red:0.627451,green:0.14509805,blue:0.16862746,alpha:0.5)) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light/v1/gaps b/resources/default_schema/com.system76.CosmicTheme.Light/v1/gaps new file mode 100644 index 00000000..095bb991 --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Light/v1/gaps @@ -0,0 +1 @@ +(0,4) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light/v1/icon_button b/resources/default_schema/com.system76.CosmicTheme.Light/v1/icon_button new file mode 100644 index 00000000..1c1b08d1 --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Light/v1/icon_button @@ -0,0 +1 @@ +(base:(red:0.0,green:0.0,blue:0.0,alpha:0.0),hover:(red:0.30980393,green:0.30980393,blue:0.30980393,alpha:0.5),pressed:(red:0.37254903,green:0.37254903,blue:0.37254903,alpha:0.5),selected:(red:0.30980393,green:0.30980393,blue:0.30980393,alpha:0.5),selected_text:(red:0.0,green:0.28627452,blue:0.42745098,alpha:1.0),focus:(red:0.0,green:0.28627452,blue:0.42745098,alpha:1.0),divider:(red:0.1882353,green:0.1882353,blue:0.1882353,alpha:0.2),on:(red:0.1882353,green:0.1882353,blue:0.1882353,alpha:1.0),disabled:(red:0.0,green:0.0,blue:0.0,alpha:0.0),on_disabled:(red:0.09411765,green:0.09411765,blue:0.09411765,alpha:0.5),border:(red:0.1882353,green:0.1882353,blue:0.1882353,alpha:1.0),disabled_border:(red:0.1882353,green:0.1882353,blue:0.1882353,alpha:0.5)) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light/v1/link_button b/resources/default_schema/com.system76.CosmicTheme.Light/v1/link_button new file mode 100644 index 00000000..cd3bd289 --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Light/v1/link_button @@ -0,0 +1 @@ +(base:(red:0.0,green:0.0,blue:0.0,alpha:0.0),hover:(red:0.0,green:0.0,blue:0.0,alpha:0.0),pressed:(red:0.0,green:0.0,blue:0.0,alpha:0.0),selected:(red:0.0,green:0.0,blue:0.0,alpha:0.0),selected_text:(red:0.0,green:0.28627452,blue:0.42745098,alpha:1.0),focus:(red:0.0,green:0.28627452,blue:0.42745098,alpha:1.0),divider:(red:0.0,green:0.28627452,blue:0.42745098,alpha:0.2),on:(red:0.0,green:0.28627452,blue:0.42745098,alpha:1.0),disabled:(red:0.0,green:0.0,blue:0.0,alpha:0.0),on_disabled:(red:0.0,green:0.14313726,blue:0.21372549,alpha:0.5),border:(red:0.1882353,green:0.1882353,blue:0.1882353,alpha:1.0),disabled_border:(red:0.1882353,green:0.1882353,blue:0.1882353,alpha:0.5)) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light/v1/success_button b/resources/default_schema/com.system76.CosmicTheme.Light/v1/success_button new file mode 100644 index 00000000..c0db6abd --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Light/v1/success_button @@ -0,0 +1 @@ +(base:(red:0.23137255,green:0.43137255,blue:0.2627451,alpha:1.0),hover:(red:0.4254902,green:0.5254902,blue:0.44117647,alpha:1.0),pressed:(red:0.4882353,green:0.5882353,blue:0.50392157,alpha:1.0),selected:(red:0.4254902,green:0.5254902,blue:0.44117647,alpha:1.0),selected_text:(red:0.0,green:0.28627452,blue:0.42745098,alpha:1.0),focus:(red:0.0,green:0.28627452,blue:0.42745098,alpha:1.0),divider:(red:0.8862745,green:0.8862745,blue:0.8862745,alpha:1.0),on:(red:1.0,green:1.0,blue:1.0,alpha:1.0),disabled:(red:0.23137255,green:0.43137255,blue:0.2627451,alpha:1.0),on_disabled:(red:1.0,green:1.0,blue:1.0,alpha:0.5),border:(red:0.23137255,green:0.43137255,blue:0.2627451,alpha:1.0),disabled_border:(red:0.23137255,green:0.43137255,blue:0.2627451,alpha:0.5)) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light/v1/text_button b/resources/default_schema/com.system76.CosmicTheme.Light/v1/text_button new file mode 100644 index 00000000..f4a29d92 --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Light/v1/text_button @@ -0,0 +1 @@ +(base:(red:0.0,green:0.0,blue:0.0,alpha:0.0),hover:(red:0.30980393,green:0.30980393,blue:0.30980393,alpha:0.5),pressed:(red:0.37254903,green:0.37254903,blue:0.37254903,alpha:0.5),selected:(red:0.30980393,green:0.30980393,blue:0.30980393,alpha:0.5),selected_text:(red:0.0,green:0.28627452,blue:0.42745098,alpha:1.0),focus:(red:0.0,green:0.28627452,blue:0.42745098,alpha:1.0),divider:(red:0.0,green:0.28627452,blue:0.42745098,alpha:0.2),on:(red:0.0,green:0.28627452,blue:0.42745098,alpha:1.0),disabled:(red:0.0,green:0.0,blue:0.0,alpha:0.0),on_disabled:(red:0.0,green:0.14313726,blue:0.21372549,alpha:0.5),border:(red:0.1882353,green:0.1882353,blue:0.1882353,alpha:1.0),disabled_border:(red:0.1882353,green:0.1882353,blue:0.1882353,alpha:0.5)) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light/v1/warning_button b/resources/default_schema/com.system76.CosmicTheme.Light/v1/warning_button new file mode 100644 index 00000000..3ff4484b --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Light/v1/warning_button @@ -0,0 +1 @@ +(base:(red:0.5882353,green:0.40784314,blue:0.0,alpha:1.0),hover:(red:0.6039216,green:0.5137255,blue:0.30980393,alpha:1.0),pressed:(red:0.6666667,green:0.5764706,blue:0.37254903,alpha:1.0),selected:(red:0.6039216,green:0.5137255,blue:0.30980393,alpha:1.0),selected_text:(red:0.0,green:0.28627452,blue:0.42745098,alpha:1.0),focus:(red:0.0,green:0.28627452,blue:0.42745098,alpha:1.0),divider:(red:0.0,green:0.0,blue:0.0,alpha:1.0),on:(red:1.0,green:1.0,blue:1.0,alpha:1.0),disabled:(red:0.5882353,green:0.40784314,blue:0.0,alpha:1.0),on_disabled:(red:1.0,green:1.0,blue:1.0,alpha:0.5),border:(red:0.5882353,green:0.40784314,blue:0.0,alpha:1.0),disabled_border:(red:0.5882353,green:0.40784314,blue:0.0,alpha:0.5)) \ No newline at end of file diff --git a/resources/default_schema/com.system76.CosmicTheme.Light/v1/window_hint b/resources/default_schema/com.system76.CosmicTheme.Light/v1/window_hint new file mode 100644 index 00000000..4af18322 --- /dev/null +++ b/resources/default_schema/com.system76.CosmicTheme.Light/v1/window_hint @@ -0,0 +1 @@ +None \ No newline at end of file From 54679d1f70255c2d6b17d0fe7a7a4f6adc531d3d Mon Sep 17 00:00:00 2001 From: Ashley Wulber Date: Tue, 17 Oct 2023 13:51:36 -0400 Subject: [PATCH 27/27] fix: typo --- app/src/pages/desktop/appearance.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/pages/desktop/appearance.rs b/app/src/pages/desktop/appearance.rs index 35a24e99..2859b162 100644 --- a/app/src/pages/desktop/appearance.rs +++ b/app/src/pages/desktop/appearance.rs @@ -1002,7 +1002,7 @@ pub fn mode_and_colors() -> Section { .style(cosmic::theme::Button::IconVertical) .padding(8) .on_press(Message::DarkMode(true)), - text(&descriptions[13]) + text(&descriptions[14]) ] .spacing(8) .width(Length::FillPortion(1)) @@ -1016,7 +1016,7 @@ pub fn mode_and_colors() -> Section { .style(cosmic::theme::Button::IconVertical) .padding(8) .on_press(Message::DarkMode(false)), - text(&descriptions[14]) + text(&descriptions[15]) ] .spacing(8) .width(Length::FillPortion(1))