diff options
author | 2022-11-19 10:29:37 -0800 | |
---|---|---|
committer | 2022-12-29 10:21:23 -0800 | |
commit | d91f4f6aa74d0693179a02167d626efa3ac4c20b (patch) | |
tree | 293852763793fbf6cb142fffac222ee7a87a1edf /style/src/scrollable.rs | |
parent | a6d0d5773f0561a841a84b538523cbd97e91eccd (diff) | |
download | iced-d91f4f6aa74d0693179a02167d626efa3ac4c20b.tar.gz iced-d91f4f6aa74d0693179a02167d626efa3ac4c20b.tar.bz2 iced-d91f4f6aa74d0693179a02167d626efa3ac4c20b.zip |
Add multidirectional scrolling capabilities to the existing Scrollable.
Diffstat (limited to '')
-rw-r--r-- | style/src/scrollable.rs | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/style/src/scrollable.rs b/style/src/scrollable.rs index c6d7d537..64ed8462 100644 --- a/style/src/scrollable.rs +++ b/style/src/scrollable.rs @@ -37,11 +37,26 @@ pub trait StyleSheet { /// Produces the style of an active scrollbar. fn active(&self, style: &Self::Style) -> Scrollbar; - /// Produces the style of an hovered scrollbar. + /// Produces the style of a hovered scrollbar. fn hovered(&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) } + + /// Produces the style of an active horizontal scrollbar. + fn active_horizontal(&self, style: &Self::Style) -> Scrollbar { + self.active(style) + } + + /// Produces the style of a hovered horizontal scrollbar. + fn hovered_horizontal(&self, style: &Self::Style) -> Scrollbar { + self.hovered(style) + } + + /// Produces the style of a horizontal scrollbar that is being dragged. + fn dragging_horizontal(&self, style: &Self::Style) -> Scrollbar { + self.hovered_horizontal(style) + } } |