diff options
author | 2024-03-05 15:53:59 +0100 | |
---|---|---|
committer | 2024-03-05 15:53:59 +0100 | |
commit | 704ec9cb5cdc1d44f2df2f15de700b0af330b1d7 (patch) | |
tree | 27aeef02032c47327e74c9b3e48e83e11cde7fb2 /widget/src/scrollable.rs | |
parent | d681aaa57e3106cf0ce90b74ade040ca7bb97832 (diff) | |
download | iced-704ec9cb5cdc1d44f2df2f15de700b0af330b1d7.tar.gz iced-704ec9cb5cdc1d44f2df2f15de700b0af330b1d7.tar.bz2 iced-704ec9cb5cdc1d44f2df2f15de700b0af330b1d7.zip |
Simplify theming for `TextInput` widget
Diffstat (limited to 'widget/src/scrollable.rs')
-rw-r--r-- | widget/src/scrollable.rs | 18 |
1 files changed, 9 insertions, 9 deletions
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<Element<'a, Message, Theme, Renderer>>, ) -> 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 } } |