fix(theme): typo and derive PartialEq for ThemeBuilder
This commit is contained in:
parent
6543629f45
commit
3ee829f04f
2 changed files with 13 additions and 11 deletions
|
|
@ -459,7 +459,12 @@ where
|
|||
|
||||
/// Helper for building customized themes
|
||||
#[derive(
|
||||
Clone, Debug, Serialize, Deserialize, cosmic_config::cosmic_config_derive::CosmicConfigEntry,
|
||||
Clone,
|
||||
Debug,
|
||||
Serialize,
|
||||
Deserialize,
|
||||
cosmic_config::cosmic_config_derive::CosmicConfigEntry,
|
||||
PartialEq,
|
||||
)]
|
||||
pub struct ThemeBuilder {
|
||||
/// override the palette for the builder
|
||||
|
|
@ -528,7 +533,7 @@ impl ThemeBuilder {
|
|||
pub fn dark_high_contrast() -> Self {
|
||||
let palette: CosmicPalette<Srgba> = DARK_PALETTE.to_owned().into();
|
||||
Self {
|
||||
palette: CosmicPalette::HighContrastLight(palette.inner()),
|
||||
palette: CosmicPalette::HighContrastDark(palette.inner()),
|
||||
..Default::default()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -163,16 +163,13 @@ where
|
|||
cosmic_theme::THEME_MODE_ID.into(),
|
||||
cosmic_theme::ThemeMode::version(),
|
||||
)
|
||||
.map(|(_, u)| {
|
||||
tracing::error!("{u:?}");
|
||||
match u {
|
||||
Ok(t) => Message::SystemThemeModeChange(t),
|
||||
Err((errors, t)) => {
|
||||
for e in errors {
|
||||
tracing::error!("{e}");
|
||||
}
|
||||
Message::SystemThemeModeChange(t)
|
||||
.map(|(_, u)| match u {
|
||||
Ok(t) => Message::SystemThemeModeChange(t),
|
||||
Err((errors, t)) => {
|
||||
for e in errors {
|
||||
tracing::error!("{e}");
|
||||
}
|
||||
Message::SystemThemeModeChange(t)
|
||||
}
|
||||
})
|
||||
.map(super::Message::Cosmic),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue