summaryrefslogtreecommitdiffstats
path: root/style/src/theme.rs
diff options
context:
space:
mode:
authorLibravatar Bingus <shankern@protonmail.com>2022-11-19 10:29:37 -0800
committerLibravatar bungoboingo <shankern@protonmail.com>2022-12-29 10:21:23 -0800
commitd91f4f6aa74d0693179a02167d626efa3ac4c20b (patch)
tree293852763793fbf6cb142fffac222ee7a87a1edf /style/src/theme.rs
parenta6d0d5773f0561a841a84b538523cbd97e91eccd (diff)
downloadiced-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/theme.rs24
1 files changed, 24 insertions, 0 deletions
diff --git a/style/src/theme.rs b/style/src/theme.rs
index 271d9a29..cef8f2be 100644
--- a/style/src/theme.rs
+++ b/style/src/theme.rs
@@ -925,6 +925,30 @@ impl scrollable::StyleSheet for Theme {
Scrollable::Custom(custom) => custom.dragging(self),
}
}
+
+ fn active_horizontal(&self, style: &Self::Style) -> scrollable::Scrollbar {
+ match style {
+ Scrollable::Default => self.active(style),
+ Scrollable::Custom(custom) => custom.active_horizontal(self),
+ }
+ }
+
+ fn hovered_horizontal(&self, style: &Self::Style) -> scrollable::Scrollbar {
+ match style {
+ Scrollable::Default => self.hovered(style),
+ Scrollable::Custom(custom) => custom.hovered_horizontal(self),
+ }
+ }
+
+ fn dragging_horizontal(
+ &self,
+ style: &Self::Style,
+ ) -> scrollable::Scrollbar {
+ match style {
+ Scrollable::Default => self.hovered_horizontal(style),
+ Scrollable::Custom(custom) => custom.dragging_horizontal(self),
+ }
+ }
}
/// The style of text.