summaryrefslogtreecommitdiffstats
path: root/style
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-03-04 19:31:26 +0100
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-03-04 19:32:13 +0100
commit4130ae4be95ce850263fbc55f490b68a95361d58 (patch)
tree25b1acc723e217e5890e20aa8e796db0f35be231 /style
parentce309db37b8eb9860ae1f1be1710fb39e7a9edea (diff)
downloadiced-4130ae4be95ce850263fbc55f490b68a95361d58.tar.gz
iced-4130ae4be95ce850263fbc55f490b68a95361d58.tar.bz2
iced-4130ae4be95ce850263fbc55f490b68a95361d58.zip
Simplify theming for `Text` widget
Diffstat (limited to 'style')
-rw-r--r--style/src/theme.rs27
1 files changed, 1 insertions, 26 deletions
diff --git a/style/src/theme.rs b/style/src/theme.rs
index 656d6bf9..43e7cafd 100644
--- a/style/src/theme.rs
+++ b/style/src/theme.rs
@@ -1203,32 +1203,7 @@ impl scrollable::StyleSheet for Theme {
}
}
-/// The style of text.
-#[derive(Clone, Copy, Default)]
-pub enum Text {
- /// The default style.
- #[default]
- Default,
- /// Colored text.
- Color(Color),
-}
-
-impl From<Color> for Text {
- fn from(color: Color) -> Self {
- Text::Color(color)
- }
-}
-
-impl text::StyleSheet for Theme {
- type Style = Text;
-
- fn appearance(&self, style: Self::Style) -> text::Appearance {
- match style {
- Text::Default => text::Appearance::default(),
- Text::Color(c) => text::Appearance { color: Some(c) },
- }
- }
-}
+impl text::StyleSheet for Theme {}
/// The style of a text input.
#[derive(Default)]