diff options
author | 2023-03-25 01:05:56 +0100 | |
---|---|---|
committer | 2023-03-25 01:05:56 +0100 | |
commit | c337bf297d1836c429cd24964e8b3bdcc13850be (patch) | |
tree | fc4c01db1425dad91fcd92f7867129d2a2f5f7cf /style | |
parent | 4f41927155e7d4bc38497b0e298a0b23ccea6ca1 (diff) | |
download | iced-c337bf297d1836c429cd24964e8b3bdcc13850be.tar.gz iced-c337bf297d1836c429cd24964e8b3bdcc13850be.tar.bz2 iced-c337bf297d1836c429cd24964e8b3bdcc13850be.zip |
renamed scrollable styles
Diffstat (limited to 'style')
-rw-r--r-- | style/src/scrollable.rs | 14 | ||||
-rw-r--r-- | style/src/theme.rs | 20 |
2 files changed, 17 insertions, 17 deletions
diff --git a/style/src/scrollable.rs b/style/src/scrollable.rs index a3f3db20..f3c04235 100644 --- a/style/src/scrollable.rs +++ b/style/src/scrollable.rs @@ -38,15 +38,15 @@ pub trait StyleSheet { fn active(&self, style: &Self::Style) -> Scrollbar; /// Produces the style of a hovered scrollbar. - fn hovered(&self, style: &Self::Style) -> Scrollbar; + fn hovered_scrollbar(&self, style: &Self::Style) -> Scrollbar; /// Produces the style of a scrollbar that is being dragged. fn dragging(&self, style: &Self::Style) -> Scrollbar { - self.hovered(style) + self.hovered_scrollbar(style) } /// Produces the style of a scrollbar when mouse is over the scrollable area. - fn focused(&self, style: &Self::Style) -> Scrollbar { + fn hovered(&self, style: &Self::Style) -> Scrollbar { self.active(style) } @@ -56,17 +56,17 @@ pub trait StyleSheet { } /// Produces the style of a hovered horizontal scrollbar. - fn hovered_horizontal(&self, style: &Self::Style) -> Scrollbar { - self.hovered(style) + fn hovered_scrollbar_horizontal(&self, style: &Self::Style) -> Scrollbar { + self.hovered_scrollbar(style) } /// Produces the style of a horizontal scrollbar that is being dragged. fn dragging_horizontal(&self, style: &Self::Style) -> Scrollbar { - self.hovered_horizontal(style) + self.hovered_scrollbar_horizontal(style) } /// Produces the style of a horizontal scrollbar when mouse is over the scrollable area. - fn focused_horizontal(&self, style: &Self::Style) -> Scrollbar { + fn hovered_horizontal(&self, style: &Self::Style) -> Scrollbar { self.active_horizontal(style) } } diff --git a/style/src/theme.rs b/style/src/theme.rs index 1d262562..9a3105b5 100644 --- a/style/src/theme.rs +++ b/style/src/theme.rs @@ -906,7 +906,7 @@ impl scrollable::StyleSheet for Theme { } } - fn hovered(&self, style: &Self::Style) -> scrollable::Scrollbar { + fn hovered_scrollbar(&self, style: &Self::Style) -> scrollable::Scrollbar { match style { Scrollable::Default => { let palette = self.extended_palette(); @@ -924,21 +924,21 @@ impl scrollable::StyleSheet for Theme { }, } } - Scrollable::Custom(custom) => custom.hovered(self), + Scrollable::Custom(custom) => custom.hovered_scrollbar(self), } } fn dragging(&self, style: &Self::Style) -> scrollable::Scrollbar { match style { - Scrollable::Default => self.hovered(style), + Scrollable::Default => self.hovered_scrollbar(style), Scrollable::Custom(custom) => custom.dragging(self), } } - fn focused(&self, style: &Self::Style) -> scrollable::Scrollbar { + fn hovered(&self, style: &Self::Style) -> scrollable::Scrollbar { match style { Scrollable::Default => self.active(style), - Scrollable::Custom(custom) => custom.focused(self), + Scrollable::Custom(custom) => custom.hovered(self), } } @@ -949,10 +949,10 @@ impl scrollable::StyleSheet for Theme { } } - fn hovered_horizontal(&self, style: &Self::Style) -> scrollable::Scrollbar { + fn hovered_scrollbar_horizontal(&self, style: &Self::Style) -> scrollable::Scrollbar { match style { - Scrollable::Default => self.hovered(style), - Scrollable::Custom(custom) => custom.hovered_horizontal(self), + Scrollable::Default => self.hovered_scrollbar(style), + Scrollable::Custom(custom) => custom.hovered_scrollbar_horizontal(self), } } @@ -966,13 +966,13 @@ impl scrollable::StyleSheet for Theme { } } - fn focused_horizontal( + fn hovered_horizontal( &self, style: &Self::Style, ) -> scrollable::Scrollbar { match style { Scrollable::Default => self.active_horizontal(style), - Scrollable::Custom(custom) => custom.focused_horizontal(self), + Scrollable::Custom(custom) => custom.hovered_horizontal(self), } } } |