From f4a4845ddbdced81ae4ff60bfa19f0e602d84709 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Mon, 4 Mar 2024 20:42:37 +0100 Subject: Simplify theming for `Button` widget --- style/src/theme.rs | 123 +---------------------------------------------------- 1 file changed, 1 insertion(+), 122 deletions(-) (limited to 'style/src/theme.rs') diff --git a/style/src/theme.rs b/style/src/theme.rs index 43e7cafd..f967aebc 100644 --- a/style/src/theme.rs +++ b/style/src/theme.rs @@ -4,7 +4,6 @@ pub mod palette; pub use palette::Palette; use crate::application; -use crate::button; use crate::checkbox; use crate::container; use crate::core::widget::text; @@ -22,7 +21,7 @@ use crate::text_editor; use crate::text_input; use crate::toggler; -use crate::core::{Background, Border, Color, Shadow, Vector}; +use crate::core::{Background, Border, Color, Shadow}; use std::fmt; use std::rc::Rc; @@ -285,126 +284,6 @@ impl application::Appearance> application::StyleSheet for T { } } -/// The style of a button. -#[derive(Default)] -pub enum Button { - /// The primary style. - #[default] - Primary, - /// The secondary style. - Secondary, - /// The positive style. - Positive, - /// The destructive style. - Destructive, - /// The text style. - /// - /// Useful for links! - Text, - /// A custom style. - Custom(Box>), -} - -impl Button { - /// Creates a custom [`Button`] style variant. - pub fn custom( - style_sheet: impl button::StyleSheet