summaryrefslogtreecommitdiffstats
path: root/core/src/theme.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector@hecrj.dev>2024-03-16 19:52:34 +0100
committerLibravatar GitHub <noreply@github.com>2024-03-16 19:52:34 +0100
commit9d79d7b96bb133820a097a6503a9003075ef714a (patch)
tree80d346f14fcc3b99aa60b85df230723db226d849 /core/src/theme.rs
parent36b73781f1fed0b4918d34932c2dcd17fa55cbe5 (diff)
parent7da06056fac9fb26b9b61dc08ee48f6816340f9b (diff)
downloadiced-9d79d7b96bb133820a097a6503a9003075ef714a.tar.gz
iced-9d79d7b96bb133820a097a6503a9003075ef714a.tar.bz2
iced-9d79d7b96bb133820a097a6503a9003075ef714a.zip
Merge pull request #2329 from casperstorm/feat/ferra
feat: added Ferra theme
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),
}
}