summaryrefslogtreecommitdiffstats
path: root/style/src/theme.rs
diff options
context:
space:
mode:
Diffstat (limited to 'style/src/theme.rs')
-rw-r--r--style/src/theme.rs43
1 files changed, 43 insertions, 0 deletions
diff --git a/style/src/theme.rs b/style/src/theme.rs
index e1ac719e..3eb4ea70 100644
--- a/style/src/theme.rs
+++ b/style/src/theme.rs
@@ -9,6 +9,7 @@ use crate::pane_grid;
use crate::progress_bar;
use crate::radio;
use crate::rule;
+use crate::scrollable;
use crate::slider;
use crate::text_input;
use crate::toggler;
@@ -459,6 +460,48 @@ impl rule::StyleSheet for Theme {
}
/*
+ * Scrollable
+ */
+
+impl scrollable::StyleSheet for Theme {
+ type Style = ();
+
+ fn active(&self, _style: Self::Style) -> scrollable::Scrollbar {
+ let palette = self.extended_palette();
+
+ scrollable::Scrollbar {
+ background: palette.background.weak.color.into(),
+ border_radius: 2.0,
+ border_width: 0.0,
+ border_color: Color::TRANSPARENT,
+ scroller: scrollable::Scroller {
+ color: palette.background.strong.color.into(),
+ border_radius: 2.0,
+ border_width: 0.0,
+ border_color: Color::TRANSPARENT,
+ },
+ }
+ }
+
+ fn hovered(&self, _style: Self::Style) -> scrollable::Scrollbar {
+ let palette = self.extended_palette();
+
+ scrollable::Scrollbar {
+ background: palette.background.weak.color.into(),
+ border_radius: 2.0,
+ border_width: 0.0,
+ border_color: Color::TRANSPARENT,
+ scroller: scrollable::Scroller {
+ color: palette.primary.strong.color.into(),
+ border_radius: 2.0,
+ border_width: 0.0,
+ border_color: Color::TRANSPARENT,
+ },
+ }
+ }
+}
+
+/*
* Text Input
*/
impl text_input::StyleSheet for Theme {