From 704ec9cb5cdc1d44f2df2f15de700b0af330b1d7 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Tue, 5 Mar 2024 15:53:59 +0100 Subject: Simplify theming for `TextInput` widget --- widget/src/scrollable.rs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'widget/src/scrollable.rs') diff --git a/widget/src/scrollable.rs b/widget/src/scrollable.rs index 8231685b..864fbec8 100644 --- a/widget/src/scrollable.rs +++ b/widget/src/scrollable.rs @@ -49,7 +49,7 @@ where content: impl Into>, ) -> Self where - Theme: Tradition, + Theme: Style, { Self::with_direction(content, Direction::default()) } @@ -60,7 +60,7 @@ where direction: Direction, ) -> Self where - Theme: Tradition, + Theme: Style, { let content = content.into(); @@ -83,7 +83,7 @@ where direction, content, on_scroll: None, - style: Theme::tradition(), + style: Theme::style(), } } @@ -1653,14 +1653,14 @@ pub struct Scroller { pub border: Border, } -/// The definition of the traditional style of a [`Scrollable`]. -pub trait Tradition { - /// Returns the traditional style of a [`Scrollable`]. - fn tradition() -> fn(&Self, Status) -> Appearance; +/// The definition of the default style of a [`Scrollable`]. +pub trait Style { + /// Returns the default style of a [`Scrollable`]. + fn style() -> fn(&Self, Status) -> Appearance; } -impl Tradition for Theme { - fn tradition() -> fn(&Self, Status) -> Appearance { +impl Style for Theme { + fn style() -> fn(&Self, Status) -> Appearance { default } } -- cgit