diff options
author | 2022-11-09 04:05:31 +0100 | |
---|---|---|
committer | 2022-11-09 04:05:31 +0100 | |
commit | 18fb74f20092b2703a90afdb01f39754445998da (patch) | |
tree | f178b11be114717059c36248c45f8a005dbe5a38 /native/src/widget/slider.rs | |
parent | 8102f96f12e6cb22dd2a23accea2c70490c8c532 (diff) | |
download | iced-18fb74f20092b2703a90afdb01f39754445998da.tar.gz iced-18fb74f20092b2703a90afdb01f39754445998da.tar.bz2 iced-18fb74f20092b2703a90afdb01f39754445998da.zip |
Introduce `Custom` variants for every style in the built-in `Theme`
Diffstat (limited to 'native/src/widget/slider.rs')
-rw-r--r-- | native/src/widget/slider.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/native/src/widget/slider.rs b/native/src/widget/slider.rs index 585d9c35..92ed72e9 100644 --- a/native/src/widget/slider.rs +++ b/native/src/widget/slider.rs @@ -222,7 +222,7 @@ where self.value, &self.range, theme, - self.style, + &self.style, ) } @@ -353,7 +353,7 @@ pub fn draw<T, R>( value: T, range: &RangeInclusive<T>, style_sheet: &dyn StyleSheet<Style = <R::Theme as StyleSheet>::Style>, - style: <R::Theme as StyleSheet>::Style, + style: &<R::Theme as StyleSheet>::Style, ) where T: Into<f64> + Copy, R: crate::Renderer, @@ -363,11 +363,11 @@ pub fn draw<T, R>( let is_mouse_over = bounds.contains(cursor_position); let style = if state.is_dragging { - style_sheet.dragging(style) + style_sheet.dragging(&style) } else if is_mouse_over { - style_sheet.hovered(style) + style_sheet.hovered(&style) } else { - style_sheet.active(style) + style_sheet.active(&style) }; let rail_y = bounds.y + (bounds.height / 2.0).round(); |