From 0eef591171c6c449b99fe0966571cd3ea3507919 Mon Sep 17 00:00:00 2001 From: Adil Hanney Date: Fri, 17 Jul 2026 15:58:48 +0100 Subject: [PATCH] fix(cosmic-theme): remove kdeglobals theme generation support --- cosmic-theme/src/output/mod.rs | 4 - cosmic-theme/src/output/qt_output.rs | 531 ++---------------- ...put__tests__dark_default_kcolorscheme.snap | 157 ------ ...ut__tests__light_default_kcolorscheme.snap | 157 ------ 4 files changed, 52 insertions(+), 797 deletions(-) delete mode 100644 cosmic-theme/src/output/snapshots/cosmic_theme__output__qt_output__tests__dark_default_kcolorscheme.snap delete mode 100644 cosmic-theme/src/output/snapshots/cosmic_theme__output__qt_output__tests__light_default_kcolorscheme.snap diff --git a/cosmic-theme/src/output/mod.rs b/cosmic-theme/src/output/mod.rs index 04dce39f..93824111 100644 --- a/cosmic-theme/src/output/mod.rs +++ b/cosmic-theme/src/output/mod.rs @@ -34,10 +34,8 @@ impl Theme { /// Apply COSMIC theme exports for GTK and Qt applications. pub fn apply_exports(&self) -> Result<(), OutputError> { let gtk_res = Theme::apply_gtk(self.is_dark); - let qt_res = Theme::apply_qt(self.is_dark); let qt56ct_res = Theme::apply_qt56ct(self.is_dark); gtk_res?; - qt_res?; qt56ct_res?; Ok(()) } @@ -46,10 +44,8 @@ impl Theme { /// Write COSMIC theme exports for GTK and Qt applications. pub fn write_exports(&self) -> Result<(), OutputError> { let gtk_res = self.write_gtk4(); - let qt_res = self.write_qt(); let qt56ct_res = self.write_qt56ct(); gtk_res?; - qt_res?; qt56ct_res?; Ok(()) } diff --git a/cosmic-theme/src/output/qt_output.rs b/cosmic-theme/src/output/qt_output.rs index 84614e7b..92dfad9f 100644 --- a/cosmic-theme/src/output/qt_output.rs +++ b/cosmic-theme/src/output/qt_output.rs @@ -1,280 +1,21 @@ use crate::Theme; use configparser::ini::Ini; -use cosmic_config::CosmicConfigEntry; -use palette::blend::Compose; -use palette::{Mix, Srgba}; -use std::fs::{self, File}; -use std::io::{self, Write}; -use std::path::{Path, PathBuf}; +use std::path::PathBuf; +use std::{fs, io}; -use super::{OutputError, qt_settings_ini_style}; +use super::OutputError; impl Theme { - /// Produces a color scheme ini file for Qt. - /// - /// Some high-level documentation for this file can be found at: - /// - https://api.kde.org/kcolorscheme.html - /// - https://web.archive.org/web/20250402234329/https://docs.kde.org/stable5/en/plasma-workspace/kcontrol/colors/ - #[must_use] - #[cold] - pub fn as_kcolorscheme(&self) -> String { - // Usually, disabled elements will have strongly reduced contrast and are often notably darker or lighter - let disabled_color_effects = IniColorEffects { - color: self.button.disabled, - color_amount: 0.0, - color_effect: ColorEffect::Desaturate, - contrast_amount: 0.65, - contrast_effect: ColorEffect::Fade, - intensity_amount: 0.1, - intensity_effect: IntensityEffect::Lighten, - }; - // Usually, inactive elements will have reduced contrast (text fades slightly into the background) and may have slightly reduced intensity - let inactive_color_effects = IniColorEffects { - color: self.palette.gray_1, - color_amount: 0.025, - color_effect: ColorEffect::Tint, - contrast_amount: 0.1, - contrast_effect: ColorEffect::Tint, - intensity_amount: 0.0, - intensity_effect: IntensityEffect::Shade, - }; - - let bg = self.background.base; - // the background container - let window_colors = IniColors { - background_alternate: bg.mix(self.accent.base, 0.05), - background_normal: bg, - decoration_focus: self.accent_text_color(), - decoration_hover: self.accent_text_color(), - foreground_active: self.accent_text_color(), - foreground_inactive: self.background.on.mix(bg, 0.1), - foreground_link: self.link_button.on, - foreground_negative: self.destructive_text_color(), - foreground_neutral: self.warning_text_color(), - foreground_normal: self.background.on, - foreground_positive: self.success_text_color(), - foreground_visited: self.accent_text_color(), - }; - // components inside the background container - let view_colors = IniColors { - background_alternate: self.background.component.base.mix(self.accent.base, 0.05), - background_normal: self.background.component.base, - ..window_colors - }; - - // selected text and items - let selection_colors = { - // selection colors are swapped to fix menu bar contrast - let selected = self.background.component.selected_text; - let selected_text = self.background.component.selected; - IniColors { - background_alternate: selected.mix(bg, 0.5), - background_normal: selected, - decoration_focus: selected, - decoration_hover: selected, - foreground_active: selected_text, - foreground_inactive: selected_text.mix(selected, 0.5), - foreground_link: self.link_button.base, - foreground_negative: self.destructive_color(), - foreground_neutral: self.warning_color(), - foreground_normal: selected_text, - foreground_positive: self.success_color(), - foreground_visited: self.accent_color(), - } - }; - - let button_colors = IniColors { - background_alternate: self.accent_button.base, - background_normal: self.button.base, - ..view_colors - }; - - // Complementary: Areas of applications with an alternative color scheme; usually with a dark background for light color schemes. - let complementary_colors = { - let dark = if self.is_dark { - self.clone() - } else if cfg!(test) { - // For reproducible results in tests, use the default dark theme - Theme::dark_default() - } else { - Theme::dark_config() - .ok() - .as_ref() - .and_then(|conf| Theme::get_entry(conf).ok()) - .unwrap_or_else(|| self.clone()) - }; - IniColors { - background_alternate: dark.accent.base, - background_normal: dark.background.base, - decoration_focus: dark.accent_text_color(), - decoration_hover: dark.accent_text_color(), - foreground_active: dark.accent_text_color(), - foreground_inactive: dark.background.on.mix(dark.background.base, 0.1), - foreground_link: dark.link_button.on, - foreground_negative: dark.destructive_text_color(), - foreground_neutral: dark.warning_text_color(), - foreground_normal: dark.background.on, - foreground_positive: dark.success_text_color(), - foreground_visited: dark.accent_text_color(), - } - }; - - // headers in cosmic don't have a background - let header_colors = &window_colors; - let header_colors_inactive = &window_colors; - // tool tips, "What's This" tips, and similar elements - let tooltip_colors = &view_colors; - - let general_color_scheme = if self.is_dark { - "CosmicDark" - } else { - "CosmicLight" - }; - let general_name = if self.is_dark { - "COSMIC Dark" - } else { - "COSMIC Light" - }; - // COSMIC icons are stuck in light mode, so use breeze icons instead - let icons_theme = if self.is_dark { - "breeze-dark" - } else { - "breeze" - }; - - format!( - r#"# GENERATED BY COSMIC - -[ColorEffects:Disabled] -{} - -[ColorEffects:Inactive] -ChangeSelectionColor=false -Enable=false -{} - -[Colors:Button] -{} - -[Colors:Complementary] -{} - -[Colors:Header] -{} - -[Colors:Header][Inactive] -{} - -[Colors:Selection] -{} - -[Colors:Tooltip] -{} - -[Colors:View] -{} - -[Colors:Window] -{} - -[General] -ColorScheme={general_color_scheme} -Name={general_name} -shadeSortColumn=true - -[Icons] -Theme={icons_theme} - -[KDE] -contrast=4 -widgetStyle=qt6ct-style - -[WM] -{} -"#, - format_ini_color_effects(&disabled_color_effects, bg), - format_ini_color_effects(&inactive_color_effects, bg), - format_ini_colors(&button_colors, bg), - format_ini_colors(&complementary_colors, bg), - format_ini_colors(&header_colors, bg), - format_ini_colors(&header_colors_inactive, bg), - format_ini_colors(&selection_colors, bg), - format_ini_colors(&tooltip_colors, bg), - format_ini_colors(&view_colors, bg), - format_ini_colors(&window_colors, bg), - format_ini_wm_colors(&window_colors, self.is_dark), - ) - } - - /// Write the color scheme to the appropriate directory. - /// Should be written in `~/.local/share/color-schemes/`. - /// - /// See the docs: https://develop.kde.org/docs/plasma/#color-scheme - /// - /// # Errors - /// - /// Returns an `OutputError` if there is an error writing the colors file. - #[cold] - pub fn write_qt(&self) -> Result<(), OutputError> { - let kcolorscheme = self.as_kcolorscheme(); - let file_path = Self::get_kcolorscheme_path(self.is_dark)?; - let tmp_file_path = file_path.with_extension("colors.new"); - - // Write to tmp_file_path first, then move it to file_path - let mut tmp_file = File::create(&tmp_file_path).map_err(OutputError::Io)?; - let res = tmp_file - .write_all(kcolorscheme.as_bytes()) - .and_then(|_| tmp_file.flush()) - .and_then(|_| std::fs::rename(&tmp_file_path, file_path)); - if let Err(e) = res { - _ = std::fs::remove_file(&tmp_file_path); - return Err(OutputError::Io(e)); - } - - Ok(()) - } - - /// Apply the color scheme by copying its values to `~/.config/kdeglobals`. - /// - /// See the docs: https://develop.kde.org/docs/plasma/#color-scheme - /// - /// # Errors - /// - /// Returns an `OutputError` if there is an error applying the color scheme. - #[cold] - pub fn apply_qt(is_dark: bool) -> Result<(), OutputError> { - let Some(config_dir) = dirs::config_dir() else { - return Err(OutputError::MissingConfigDir); - }; - let kdeglobals_file = config_dir.join("kdeglobals"); - let mut kdeglobals_ini = Self::read_ini(&kdeglobals_file)?; - - let src_file = Self::get_kcolorscheme_path(is_dark)?; - let src_ini = Self::read_ini(&src_file)?; - - Self::backup_non_cosmic_kdeglobals(&kdeglobals_ini, &kdeglobals_file) - .map_err(OutputError::Io)?; - - for (section, key_value) in src_ini.get_map_ref() { - for (key, value) in key_value { - kdeglobals_ini.set(section, key, value.clone()); - } - } - - kdeglobals_ini - .pretty_write(kdeglobals_file, &qt_settings_ini_style()) - .map_err(OutputError::Io)?; - Ok(()) - } - - /// Reset the applied qt colors by removing color scheme values from the - /// `~/.config/kdeglobals` file. + /// Reset the applied qt colors: + /// - Remove relevant keys from the `~/.config/kdeglobals` file + /// - Delete `~/.local/share/color-schemes/CosmicDark.colors` and `CosmicLight.colors` /// /// This does not restore the backed up kdeglobals file. /// /// # Errors /// - /// Returns an `OutputError` if there is an error resetting the CSS file. + /// Returns an `OutputError` if there is an error resetting the kdeglobals + /// file or deleting the color schemes. #[cold] pub fn reset_qt() -> Result<(), OutputError> { let Some(config_dir) = dirs::config_dir() else { @@ -291,19 +32,29 @@ widgetStyle=qt6ct-style return Ok(()); } - let is_dark = false; // doesn't matter since we're only reading keys - let src_file = Self::get_kcolorscheme_path(is_dark)?; - let src_ini = Self::read_ini(&src_file)?; + let light_scheme = Self::get_kcolorscheme_path(false)?; + let dark_scheme = Self::get_kcolorscheme_path(true)?; + if light_scheme.exists() { + let src_ini = Self::read_ini(&light_scheme)?; - for (section, key_value) in src_ini.get_map_ref() { - for (key, _) in key_value { - kdeglobals_ini.remove_key(section, key); + // Remove color scheme keys from kdeglobals + for (section, key_value) in src_ini.get_map_ref() { + for key in key_value.keys() { + kdeglobals_ini.remove_key(section, key); + } } + + kdeglobals_ini + .write(kdeglobals_file) + .map_err(OutputError::Io)?; } - kdeglobals_ini - .write(kdeglobals_file) - .map_err(OutputError::Io)?; + // Delete now-unused kcolorscheme files + let delete_light_res = fs::remove_file(&light_scheme).map_err(OutputError::Io); + let delete_dark_res = fs::remove_file(&dark_scheme).map_err(OutputError::Io); + delete_light_res?; + delete_dark_res?; + Ok(()) } @@ -312,6 +63,7 @@ widgetStyle=qt6ct-style let Some(mut data_dir) = dirs::data_dir() else { return Err(OutputError::MissingDataDir); }; + data_dir.push("color-schemes"); let file_name = if is_dark { "CosmicDark.colors" @@ -319,11 +71,6 @@ widgetStyle=qt6ct-style "CosmicLight.colors" }; - data_dir.push("color-schemes"); - if !data_dir.exists() { - std::fs::create_dir_all(&data_dir).map_err(OutputError::Io)?; - } - Ok(data_dir.join(file_name)) } @@ -338,15 +85,6 @@ widgetStyle=qt6ct-style Ok(ini) } - #[cold] - fn backup_non_cosmic_kdeglobals(ini: &Ini, path: &Path) -> io::Result<()> { - if !Self::is_cosmic_kdeglobals(&ini)?.unwrap_or(true) { - let backup_path = path.with_extension("bak"); - fs::copy(path, &backup_path)?; - } - Ok(()) - } - #[cold] fn is_cosmic_kdeglobals(ini: &Ini) -> io::Result> { let color_scheme = ini.get("General", "ColorScheme"); @@ -360,208 +98,43 @@ widgetStyle=qt6ct-style } } -/// Formats a color in the form `r,g,b` e.g. `255,255,255`. -/// If the color has transparency, it is mixed with bg first. -fn to_rgb(c: Srgba, bg: Srgba) -> String { - let c_u8: Srgba = c.over(bg).into_format(); - format!("{},{},{}", c_u8.red, c_u8.green, c_u8.blue) -} - -fn format_ini_color_effects(color_effects: &IniColorEffects, bg: Srgba) -> String { - format!( - r#"Color={} -ColorAmount={} -ColorEffect={} -ContrastAmount={} -ContrastEffect={} -IntensityAmount={} -IntensityEffect={}"#, - to_rgb(color_effects.color, bg), - color_effects.color_amount, - color_effects.color_effect.as_u8(), - color_effects.contrast_amount, - color_effects.contrast_effect.as_u8(), - color_effects.intensity_amount, - color_effects.intensity_effect.as_u8(), - ) -} - -fn format_ini_colors(colors: &IniColors, bg: Srgba) -> String { - format!( - r#"BackgroundAlternate={} -BackgroundNormal={} -DecorationFocus={} -DecorationHover={} -ForegroundActive={} -ForegroundInactive={} -ForegroundLink={} -ForegroundNegative={} -ForegroundNeutral={} -ForegroundNormal={} -ForegroundPositive={} -ForegroundVisited={}"#, - to_rgb(colors.background_alternate, bg), - to_rgb(colors.background_normal, bg), - to_rgb(colors.decoration_focus, bg), - to_rgb(colors.decoration_hover, bg), - to_rgb(colors.foreground_active, bg), - to_rgb(colors.foreground_inactive, bg), - to_rgb(colors.foreground_link, bg), - to_rgb(colors.foreground_negative, bg), - to_rgb(colors.foreground_neutral, bg), - to_rgb(colors.foreground_normal, bg), - to_rgb(colors.foreground_positive, bg), - to_rgb(colors.foreground_visited, bg), - ) -} - -/// Sets the colors for the titlebars of active and inactive windows. -fn format_ini_wm_colors(view_colors: &IniColors, is_dark: bool) -> String { - let bg = view_colors.background_normal; - let fg = view_colors.foreground_active; - let blend = if is_dark { fg } else { bg }; - - format!( - r#"activeBackground={} -activeBlend={} -activeForeground={} -inactiveBackground={} -inactiveBlend={} -inactiveForeground={}"#, - to_rgb(bg, bg), - to_rgb(blend, bg), - to_rgb(fg, bg), - to_rgb(bg, bg), - to_rgb(blend, bg), - to_rgb(fg, bg), - ) -} - -struct IniColorEffects { - color: Srgba, - color_amount: f32, - color_effect: ColorEffect, - contrast_amount: f32, - /// Applied to the text, using the background as the reference color. - contrast_effect: ColorEffect, - intensity_amount: f32, - intensity_effect: IntensityEffect, -} -/// Each color set is made up of a number of roles which are available in all other sets. -/// In addition, except for Inactive Text, there is a corresponding background role for each of the text roles. Currently (except for Normal and Alternate Background), these colors are not chosen here but are automatically determined based on Normal Background and the corresponding Text color. -struct IniColors { - /// used when there is a need to subtly change the background to aid in item association. This might be used e.g. as the background of a heading, but is mostly used for alternating rows in lists, especially multi-column lists, to aid in visually tracking rows. - background_alternate: Srgba, - /// Normal background - background_normal: Srgba, - /// Used for drawing lines or shading UI elements to indicate the item which has active input focus. - /// Typically the same as foreground_active. - decoration_focus: Srgba, - /// Used for drawing lines or shading UI elements for mouse-over effects, e.g. the "illumination" effects for buttons. - /// Typically the same as foreground_active. - decoration_hover: Srgba, - /// used to indicate an active element or attract attention, e.g. alerts, notifications; also for hovered hyperlinks - foreground_active: Srgba, - /// used for text which should be unobtrusive, e.g. comments, "subtitles", unimportant information, etc. - foreground_inactive: Srgba, - /// used for hyperlinks or to otherwise indicate "something which may be visited", or to show relationships - foreground_link: Srgba, - /// used for errors, failure notices, notifications that an action may be dangerous (e.g. unsafe web page or security context), etc. - foreground_negative: Srgba, - /// used to draw attention when another role is not appropriate; e.g. warnings, to indicate secure/encrypted content, etc. - foreground_neutral: Srgba, - /// Normal foreground - foreground_normal: Srgba, - /// used for success notices, to indicate trusted content, etc. - foreground_positive: Srgba, - /// used for "something (e.g. a hyperlink) that has been visited", or to indicate something that is "old". - foreground_visited: Srgba, -} - -/// Intensity allows the overall color to be lightened or darkened. -#[allow(dead_code)] -enum IntensityEffect { - /// Makes everything lighter or darker in a controlled manner. - /// - /// intensity_amount increases or decreases the overall intensity (i.e. perceived brightness) by an absolute amount. - Shade, - /// Changes the intensity to a percentage of the initial value. - Darken, - /// Conceptually the opposite of darken; lighten can be thought of as working with "distance from white", where darken works with "distance from black". - Lighten, -} - -impl IntensityEffect { - pub fn as_u8(&self) -> u8 { - match self { - Self::Shade => 0, - Self::Darken => 1, - Self::Lighten => 2, - } - } -} - -/// This also changes the overall color like [IntensityEffect], -/// but is not limited to intensity. -#[allow(dead_code)] -enum ColorEffect { - /// changes the relative chroma - /// - /// This is available for "ColorEffect" but not "ContrastEffect". - Desaturate, - /// smoothly blends the original color into a reference color - Fade, - /// similar to Fade, except that the color (hue and chroma) changes more quickly while the intensity changes more slowly as the amount is increased - Tint, -} - -impl ColorEffect { - pub fn as_u8(&self) -> u8 { - match self { - Self::Desaturate => 0, - Self::Fade => 1, - Self::Tint => 2, - } - } -} - #[cfg(test)] mod tests { use super::*; #[test] - fn test_opaque_color_to_rgb() { - let color = Srgba::new(30.0 / 255.0, 50.0 / 255.0, 70.0 / 255.0, 1.0); - let bg = Srgba::new(1.0, 1.0, 1.0, 1.0); - let result = to_rgb(color, bg); - assert_eq!(result, "30,50,70"); + fn test_is_cosmic_kdeglobals_dark() -> io::Result<()> { + let mut ini = Ini::new_cs(); + ini.setstr("General", "ColorScheme", Some("CosmicDark")); + let is_cosmic = Theme::is_cosmic_kdeglobals(&ini)?; + assert_eq!(is_cosmic, Some(true)); + Ok(()) } #[test] - fn test_transparent_color_to_rgb() { - let color = Srgba::new(0.0, 0.0, 0.0, 0.0); - let bg = Srgba::new(1.0, 1.0, 1.0, 1.0); - let result = to_rgb(color, bg); - assert_eq!(result, "255,255,255"); + fn test_is_cosmic_kdeglobals_light() -> io::Result<()> { + let mut ini = Ini::new_cs(); + ini.setstr("General", "ColorScheme", Some("CosmicLight")); + let is_cosmic = Theme::is_cosmic_kdeglobals(&ini)?; + assert_eq!(is_cosmic, Some(true)); + Ok(()) } #[test] - fn test_translucent_color_to_rgb() { - let color = Srgba::new(0.0, 0.0, 0.0, 0.9); - let bg = Srgba::new(1.0, 1.0, 1.0, 1.0); - let result = to_rgb(color, bg); - assert_eq!(result, "26,26,26"); + fn test_is_cosmic_kdeglobals_breeze() -> io::Result<()> { + let mut ini = Ini::new_cs(); + ini.setstr("General", "ColorScheme", Some("BreezeDark")); + let is_cosmic = Theme::is_cosmic_kdeglobals(&ini)?; + assert_eq!(is_cosmic, Some(false)); + Ok(()) } #[test] - fn test_light_default_kcolorscheme() { - let light_default_kcolorscheme = Theme::light_default().as_kcolorscheme(); - insta::assert_snapshot!(light_default_kcolorscheme); - } - - #[test] - fn test_dark_default_kcolorscheme() { - let dark_default_kcolorscheme = Theme::dark_default().as_kcolorscheme(); - insta::assert_snapshot!(dark_default_kcolorscheme); + fn test_is_cosmic_kdeglobals_blank() -> io::Result<()> { + let mut ini = Ini::new_cs(); + ini.setstr("General", "ColorScheme", None); + let is_cosmic = Theme::is_cosmic_kdeglobals(&ini)?; + assert_eq!(is_cosmic, None); + Ok(()) } } diff --git a/cosmic-theme/src/output/snapshots/cosmic_theme__output__qt_output__tests__dark_default_kcolorscheme.snap b/cosmic-theme/src/output/snapshots/cosmic_theme__output__qt_output__tests__dark_default_kcolorscheme.snap deleted file mode 100644 index c50f95dc..00000000 --- a/cosmic-theme/src/output/snapshots/cosmic_theme__output__qt_output__tests__dark_default_kcolorscheme.snap +++ /dev/null @@ -1,157 +0,0 @@ ---- -source: cosmic-theme/src/output/qt_output.rs -expression: dark_default_kcolorscheme ---- -# GENERATED BY COSMIC - -[ColorEffects:Disabled] -Color=43,43,43 -ColorAmount=0 -ColorEffect=0 -ContrastAmount=0.65 -ContrastEffect=1 -IntensityAmount=0.1 -IntensityEffect=2 - -[ColorEffects:Inactive] -ChangeSelectionColor=false -Enable=false -Color=27,27,27 -ColorAmount=0.025 -ColorEffect=2 -ContrastAmount=0.1 -ContrastEffect=2 -IntensityAmount=0 -IntensityEffect=0 - -[Colors:Button] -BackgroundAlternate=99,208,223 -BackgroundNormal=60,60,60 -DecorationFocus=99,208,223 -DecorationHover=99,208,223 -ForegroundActive=99,208,223 -ForegroundInactive=211,211,211 -ForegroundLink=99,208,223 -ForegroundNegative=255,160,154 -ForegroundNeutral=255,163,125 -ForegroundNormal=231,231,231 -ForegroundPositive=94,219,140 -ForegroundVisited=99,208,223 - -[Colors:Complementary] -BackgroundAlternate=99,208,223 -BackgroundNormal=27,27,27 -DecorationFocus=99,208,223 -DecorationHover=99,208,223 -ForegroundActive=99,208,223 -ForegroundInactive=211,211,211 -ForegroundLink=99,208,223 -ForegroundNegative=255,160,154 -ForegroundNeutral=255,163,125 -ForegroundNormal=231,231,231 -ForegroundPositive=94,219,140 -ForegroundVisited=99,208,223 - -[Colors:Header] -BackgroundAlternate=31,36,37 -BackgroundNormal=27,27,27 -DecorationFocus=99,208,223 -DecorationHover=99,208,223 -ForegroundActive=99,208,223 -ForegroundInactive=211,211,211 -ForegroundLink=99,208,223 -ForegroundNegative=255,160,154 -ForegroundNeutral=255,163,125 -ForegroundNormal=231,231,231 -ForegroundPositive=94,219,140 -ForegroundVisited=99,208,223 - -[Colors:Header][Inactive] -BackgroundAlternate=31,36,37 -BackgroundNormal=27,27,27 -DecorationFocus=99,208,223 -DecorationHover=99,208,223 -ForegroundActive=99,208,223 -ForegroundInactive=211,211,211 -ForegroundLink=99,208,223 -ForegroundNegative=255,160,154 -ForegroundNeutral=255,163,125 -ForegroundNormal=231,231,231 -ForegroundPositive=94,219,140 -ForegroundVisited=99,208,223 - -[Colors:Selection] -BackgroundAlternate=63,118,125 -BackgroundNormal=99,208,223 -DecorationFocus=99,208,223 -DecorationHover=99,208,223 -ForegroundActive=67,67,67 -ForegroundInactive=83,138,145 -ForegroundLink=27,27,27 -ForegroundNegative=255,160,154 -ForegroundNeutral=255,163,125 -ForegroundNormal=67,67,67 -ForegroundPositive=94,219,140 -ForegroundVisited=99,208,223 - -[Colors:Tooltip] -BackgroundAlternate=49,55,55 -BackgroundNormal=46,46,46 -DecorationFocus=99,208,223 -DecorationHover=99,208,223 -ForegroundActive=99,208,223 -ForegroundInactive=211,211,211 -ForegroundLink=99,208,223 -ForegroundNegative=255,160,154 -ForegroundNeutral=255,163,125 -ForegroundNormal=231,231,231 -ForegroundPositive=94,219,140 -ForegroundVisited=99,208,223 - -[Colors:View] -BackgroundAlternate=49,55,55 -BackgroundNormal=46,46,46 -DecorationFocus=99,208,223 -DecorationHover=99,208,223 -ForegroundActive=99,208,223 -ForegroundInactive=211,211,211 -ForegroundLink=99,208,223 -ForegroundNegative=255,160,154 -ForegroundNeutral=255,163,125 -ForegroundNormal=231,231,231 -ForegroundPositive=94,219,140 -ForegroundVisited=99,208,223 - -[Colors:Window] -BackgroundAlternate=31,36,37 -BackgroundNormal=27,27,27 -DecorationFocus=99,208,223 -DecorationHover=99,208,223 -ForegroundActive=99,208,223 -ForegroundInactive=211,211,211 -ForegroundLink=99,208,223 -ForegroundNegative=255,160,154 -ForegroundNeutral=255,163,125 -ForegroundNormal=231,231,231 -ForegroundPositive=94,219,140 -ForegroundVisited=99,208,223 - -[General] -ColorScheme=CosmicDark -Name=COSMIC Dark -shadeSortColumn=true - -[Icons] -Theme=breeze-dark - -[KDE] -contrast=4 -widgetStyle=qt6ct-style - -[WM] -activeBackground=27,27,27 -activeBlend=99,208,223 -activeForeground=99,208,223 -inactiveBackground=27,27,27 -inactiveBlend=99,208,223 -inactiveForeground=99,208,223 diff --git a/cosmic-theme/src/output/snapshots/cosmic_theme__output__qt_output__tests__light_default_kcolorscheme.snap b/cosmic-theme/src/output/snapshots/cosmic_theme__output__qt_output__tests__light_default_kcolorscheme.snap deleted file mode 100644 index 40363f95..00000000 --- a/cosmic-theme/src/output/snapshots/cosmic_theme__output__qt_output__tests__light_default_kcolorscheme.snap +++ /dev/null @@ -1,157 +0,0 @@ ---- -source: cosmic-theme/src/output/qt_output.rs -expression: light_default_kcolorscheme ---- -# GENERATED BY COSMIC - -[ColorEffects:Disabled] -Color=194,194,194 -ColorAmount=0 -ColorEffect=0 -ContrastAmount=0.65 -ContrastEffect=1 -IntensityAmount=0.1 -IntensityEffect=2 - -[ColorEffects:Inactive] -ChangeSelectionColor=false -Enable=false -Color=215,215,215 -ColorAmount=0.025 -ColorEffect=2 -ContrastAmount=0.1 -ContrastEffect=2 -IntensityAmount=0 -IntensityEffect=0 - -[Colors:Button] -BackgroundAlternate=0,82,90 -BackgroundNormal=173,173,173 -DecorationFocus=0,82,90 -DecorationHover=0,82,90 -ForegroundActive=0,82,90 -ForegroundInactive=38,38,38 -ForegroundLink=0,82,90 -ForegroundNegative=137,4,24 -ForegroundNeutral=121,44,0 -ForegroundNormal=18,18,18 -ForegroundPositive=0,87,44 -ForegroundVisited=0,82,90 - -[Colors:Complementary] -BackgroundAlternate=99,208,223 -BackgroundNormal=27,27,27 -DecorationFocus=99,208,223 -DecorationHover=99,208,223 -ForegroundActive=99,208,223 -ForegroundInactive=211,211,211 -ForegroundLink=99,208,223 -ForegroundNegative=255,160,154 -ForegroundNeutral=255,163,125 -ForegroundNormal=231,231,231 -ForegroundPositive=94,219,140 -ForegroundVisited=99,208,223 - -[Colors:Header] -BackgroundAlternate=204,208,209 -BackgroundNormal=215,215,215 -DecorationFocus=0,82,90 -DecorationHover=0,82,90 -ForegroundActive=0,82,90 -ForegroundInactive=38,38,38 -ForegroundLink=0,82,90 -ForegroundNegative=137,4,24 -ForegroundNeutral=121,44,0 -ForegroundNormal=18,18,18 -ForegroundPositive=0,87,44 -ForegroundVisited=0,82,90 - -[Colors:Header][Inactive] -BackgroundAlternate=204,208,209 -BackgroundNormal=215,215,215 -DecorationFocus=0,82,90 -DecorationHover=0,82,90 -ForegroundActive=0,82,90 -ForegroundInactive=38,38,38 -ForegroundLink=0,82,90 -ForegroundNegative=137,4,24 -ForegroundNeutral=121,44,0 -ForegroundNormal=18,18,18 -ForegroundPositive=0,87,44 -ForegroundVisited=0,82,90 - -[Colors:Selection] -BackgroundAlternate=108,149,153 -BackgroundNormal=0,82,90 -DecorationFocus=0,82,90 -DecorationHover=0,82,90 -ForegroundActive=246,246,246 -ForegroundInactive=123,164,168 -ForegroundLink=215,215,215 -ForegroundNegative=137,4,24 -ForegroundNeutral=121,44,0 -ForegroundNormal=246,246,246 -ForegroundPositive=0,87,44 -ForegroundVisited=0,82,90 - -[Colors:Tooltip] -BackgroundAlternate=233,237,237 -BackgroundNormal=245,245,245 -DecorationFocus=0,82,90 -DecorationHover=0,82,90 -ForegroundActive=0,82,90 -ForegroundInactive=38,38,38 -ForegroundLink=0,82,90 -ForegroundNegative=137,4,24 -ForegroundNeutral=121,44,0 -ForegroundNormal=18,18,18 -ForegroundPositive=0,87,44 -ForegroundVisited=0,82,90 - -[Colors:View] -BackgroundAlternate=233,237,237 -BackgroundNormal=245,245,245 -DecorationFocus=0,82,90 -DecorationHover=0,82,90 -ForegroundActive=0,82,90 -ForegroundInactive=38,38,38 -ForegroundLink=0,82,90 -ForegroundNegative=137,4,24 -ForegroundNeutral=121,44,0 -ForegroundNormal=18,18,18 -ForegroundPositive=0,87,44 -ForegroundVisited=0,82,90 - -[Colors:Window] -BackgroundAlternate=204,208,209 -BackgroundNormal=215,215,215 -DecorationFocus=0,82,90 -DecorationHover=0,82,90 -ForegroundActive=0,82,90 -ForegroundInactive=38,38,38 -ForegroundLink=0,82,90 -ForegroundNegative=137,4,24 -ForegroundNeutral=121,44,0 -ForegroundNormal=18,18,18 -ForegroundPositive=0,87,44 -ForegroundVisited=0,82,90 - -[General] -ColorScheme=CosmicLight -Name=COSMIC Light -shadeSortColumn=true - -[Icons] -Theme=breeze - -[KDE] -contrast=4 -widgetStyle=qt6ct-style - -[WM] -activeBackground=215,215,215 -activeBlend=215,215,215 -activeForeground=0,82,90 -inactiveBackground=215,215,215 -inactiveBlend=215,215,215 -inactiveForeground=0,82,90