From 4130ae4be95ce850263fbc55f490b68a95361d58 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Mon, 4 Mar 2024 19:31:26 +0100 Subject: Simplify theming for `Text` widget --- style/src/theme.rs | 27 +-------------------------- 1 file changed, 1 insertion(+), 26 deletions(-) (limited to 'style/src') 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 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)] -- cgit