summaryrefslogtreecommitdiffstats
path: root/core/src/theme.rs
diff options
context:
space:
mode:
authorLibravatar Gigas002 <24297712+Gigas002@users.noreply.github.com>2024-03-19 22:09:36 +0900
committerLibravatar GitHub <noreply@github.com>2024-03-19 22:09:36 +0900
commitf3a1c785b2743e9c48c3d28df0c6772ce579d7c8 (patch)
tree1b39799f45878d89b4f9e2f9bea8fa8a7ed07150 /core/src/theme.rs
parentc9453cd55d84f0dd2ad0050208863d036c98843f (diff)
parent8ce16aba6204cb5c02a709cdf79c309f7b7e0196 (diff)
downloadiced-f3a1c785b2743e9c48c3d28df0c6772ce579d7c8.tar.gz
iced-f3a1c785b2743e9c48c3d28df0c6772ce579d7c8.tar.bz2
iced-f3a1c785b2743e9c48c3d28df0c6772ce579d7c8.zip
Merge branch 'iced-rs:master' into viewer_content_fit
Diffstat (limited to 'core/src/theme.rs')
-rw-r--r--core/src/theme.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/core/src/theme.rs b/core/src/theme.rs
index 21ba2a37..948aaf83 100644
--- a/core/src/theme.rs
+++ b/core/src/theme.rs
@@ -52,6 +52,8 @@ pub enum Theme {
Nightfly,
/// The built-in Oxocarbon variant.
Oxocarbon,
+ /// The built-in Ferra variant:
+ Ferra,
/// A [`Theme`] that uses a [`Custom`] palette.
Custom(Arc<Custom>),
}
@@ -80,6 +82,7 @@ impl Theme {
Self::Moonfly,
Self::Nightfly,
Self::Oxocarbon,
+ Self::Ferra,
];
/// Creates a new custom [`Theme`] from the given [`Palette`].
@@ -121,6 +124,7 @@ impl Theme {
Self::Moonfly => Palette::MOONFLY,
Self::Nightfly => Palette::NIGHTFLY,
Self::Oxocarbon => Palette::OXOCARBON,
+ Self::Ferra => Palette::FERRA,
Self::Custom(custom) => custom.palette,
}
}
@@ -151,6 +155,7 @@ impl Theme {
Self::Moonfly => &palette::EXTENDED_MOONFLY,
Self::Nightfly => &palette::EXTENDED_NIGHTFLY,
Self::Oxocarbon => &palette::EXTENDED_OXOCARBON,
+ Self::Ferra => &palette::EXTENDED_FERRA,
Self::Custom(custom) => &custom.extended,
}
}
@@ -180,6 +185,7 @@ impl fmt::Display for Theme {
Self::Moonfly => write!(f, "Moonfly"),
Self::Nightfly => write!(f, "Nightfly"),
Self::Oxocarbon => write!(f, "Oxocarbon"),
+ Self::Ferra => write!(f, "Ferra"),
Self::Custom(custom) => custom.fmt(f),
}
}