summaryrefslogtreecommitdiffstats
path: root/style/src/theme.rs
diff options
context:
space:
mode:
authorLibravatar Var Bhat <mailvarbhat@gmail.com>2024-02-04 01:01:02 +0530
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-02-11 02:50:38 +0100
commitd5466c1861157ba5a70d7fa7b818cebe11dedbc3 (patch)
tree6a2e8cf04e8e9c6999f17896795f32c6e537ce87 /style/src/theme.rs
parent4503e2ba7e1c124798f36849d0f64a31b2e5c9a5 (diff)
downloadiced-d5466c1861157ba5a70d7fa7b818cebe11dedbc3.tar.gz
iced-d5466c1861157ba5a70d7fa7b818cebe11dedbc3.tar.bz2
iced-d5466c1861157ba5a70d7fa7b818cebe11dedbc3.zip
Add Kanagawa, Moonfly, Nightfly, Oxocarbon themes
Diffstat (limited to 'style/src/theme.rs')
-rw-r--r--style/src/theme.rs36
1 files changed, 36 insertions, 0 deletions
diff --git a/style/src/theme.rs b/style/src/theme.rs
index 20ac9343..5909498f 100644
--- a/style/src/theme.rs
+++ b/style/src/theme.rs
@@ -62,6 +62,18 @@ pub enum Theme {
TokyoNightStorm,
/// The built-in Tokyo Night Light variant.
TokyoNightLight,
+ /// The built-in Kanagawa Wave variant.
+ KanagawaWave,
+ /// The built-in Kanagawa Dragon variant.
+ KanagawaDragon,
+ /// The built-in Kanagawa Lotus variant.
+ KanagawaLotus,
+ /// The built-in Moonfly variant.
+ Moonfly,
+ /// The built-in Nightfly variant.
+ Nightfly,
+ /// The built-in Oxocarbon variant.
+ Oxocarbon,
/// A [`Theme`] that uses a [`Custom`] palette.
Custom(Arc<Custom>),
}
@@ -84,6 +96,12 @@ impl Theme {
Self::TokyoNight,
Self::TokyoNightStorm,
Self::TokyoNightLight,
+ Self::KanagawaWave,
+ Self::KanagawaDragon,
+ Self::KanagawaLotus,
+ Self::Moonfly,
+ Self::Nightfly,
+ Self::Oxocarbon,
];
/// Creates a new custom [`Theme`] from the given [`Palette`].
@@ -119,6 +137,12 @@ impl Theme {
Self::TokyoNight => Palette::TOKYO_NIGHT,
Self::TokyoNightStorm => Palette::TOKYO_NIGHT_STORM,
Self::TokyoNightLight => Palette::TOKYO_NIGHT_LIGHT,
+ Self::KanagawaWave => Palette::KANAGAWA_WAVE,
+ Self::KanagawaDragon => Palette::KANAGAWA_DRAGON,
+ Self::KanagawaLotus => Palette::KANAGAWA_LOTUS,
+ Self::Moonfly => Palette::MOONFLY,
+ Self::Nightfly => Palette::NIGHTFLY,
+ Self::Oxocarbon => Palette::OXOCARBON,
Self::Custom(custom) => custom.palette,
}
}
@@ -143,6 +167,12 @@ impl Theme {
Self::TokyoNight => &palette::EXTENDED_TOKYO_NIGHT,
Self::TokyoNightStorm => &palette::EXTENDED_TOKYO_NIGHT_STORM,
Self::TokyoNightLight => &palette::EXTENDED_TOKYO_NIGHT_LIGHT,
+ Self::KanagawaWave => &palette::EXTENDED_KANAGAWA_WAVE,
+ Self::KanagawaDragon => &palette::EXTENDED_KANAGAWA_DRAGON,
+ Self::KanagawaLotus => &palette::EXTENDED_KANAGAWA_LOTUS,
+ Self::Moonfly => &palette::EXTENDED_MOONFLY,
+ Self::Nightfly => &palette::EXTENDED_NIGHTFLY,
+ Self::Oxocarbon => &palette::EXTENDED_OXOCARBON,
Self::Custom(custom) => &custom.extended,
}
}
@@ -166,6 +196,12 @@ impl fmt::Display for Theme {
Self::TokyoNight => write!(f, "Tokyo Night"),
Self::TokyoNightStorm => write!(f, "Tokyo Night Storm"),
Self::TokyoNightLight => write!(f, "Tokyo Night Light"),
+ Self::KanagawaWave => write!(f, "Kanagawa Wave"),
+ Self::KanagawaDragon => write!(f, "Kanagawa Dragon"),
+ Self::KanagawaLotus => write!(f, "Kanagawa Lotus"),
+ Self::Moonfly => write!(f, "Moonfly"),
+ Self::Nightfly => write!(f, "Nightfly"),
+ Self::Oxocarbon => write!(f, "Oxocarbon"),
Self::Custom(custom) => custom.fmt(f),
}
}