diff options
author | 2023-01-23 16:57:24 +0100 | |
---|---|---|
committer | 2023-01-23 16:57:24 +0100 | |
commit | 7d2d813343baae10c2667590463385d50abb784c (patch) | |
tree | dd52002abbc0fe0df683a0413616892e79ea0676 /style | |
parent | eb4fcba05fb54741289a28ec9b921c90c9acc7fd (diff) | |
download | iced-7d2d813343baae10c2667590463385d50abb784c.tar.gz iced-7d2d813343baae10c2667590463385d50abb784c.tar.bz2 iced-7d2d813343baae10c2667590463385d50abb784c.zip |
added new style for scrollable, to be applied when mouse is over the scrollable area
Diffstat (limited to 'style')
-rw-r--r-- | style/src/scrollable.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/style/src/scrollable.rs b/style/src/scrollable.rs index 64ed8462..a3f3db20 100644 --- a/style/src/scrollable.rs +++ b/style/src/scrollable.rs @@ -45,6 +45,11 @@ pub trait StyleSheet { self.hovered(style) } + /// Produces the style of a scrollbar when mouse is over the scrollable area. + fn focused(&self, style: &Self::Style) -> Scrollbar { + self.active(style) + } + /// Produces the style of an active horizontal scrollbar. fn active_horizontal(&self, style: &Self::Style) -> Scrollbar { self.active(style) @@ -59,4 +64,9 @@ pub trait StyleSheet { fn dragging_horizontal(&self, style: &Self::Style) -> Scrollbar { self.hovered_horizontal(style) } + + /// Produces the style of a horizontal scrollbar when mouse is over the scrollable area. + fn focused_horizontal(&self, style: &Self::Style) -> Scrollbar { + self.active_horizontal(style) + } } |