From 833538ee7f3a60a839304762dfc29b0881d19094 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Thu, 7 Mar 2024 20:11:32 +0100 Subject: Leverage `DefaultStyle` traits instead of `Default` --- widget/src/vertical_slider.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'widget/src/vertical_slider.rs') diff --git a/widget/src/vertical_slider.rs b/widget/src/vertical_slider.rs index 93abe02a..103c3b7d 100644 --- a/widget/src/vertical_slider.rs +++ b/widget/src/vertical_slider.rs @@ -2,7 +2,7 @@ use std::ops::RangeInclusive; pub use crate::slider::{ - default, Appearance, Handle, HandleShape, Status, Style, + default, Appearance, DefaultStyle, Handle, HandleShape, Status, Style, }; use crate::core; @@ -72,7 +72,7 @@ where /// `Message`. pub fn new(range: RangeInclusive, value: T, on_change: F) -> Self where - Style: Default, + Theme: DefaultStyle, F: 'a + Fn(T) -> Message, { let value = if value >= *range.start() { @@ -97,7 +97,7 @@ where on_release: None, width: Self::DEFAULT_WIDTH, height: Length::Fill, - style: Style::default(), + style: Theme::default_style(), } } @@ -351,7 +351,7 @@ where let bounds = layout.bounds(); let is_mouse_over = cursor.is_over(bounds); - let style = (self.style.0)( + let style = (self.style)( theme, if state.is_dragging { Status::Dragged -- cgit