summaryrefslogtreecommitdiffstats
path: root/widget/src/vertical_slider.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-03-07 20:11:32 +0100
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-03-07 20:11:32 +0100
commit833538ee7f3a60a839304762dfc29b0881d19094 (patch)
tree7afbc69659c95f9cbec58c938f1939cca3290b04 /widget/src/vertical_slider.rs
parent44f002f64a9d53040f09affe69bd92675e302e16 (diff)
downloadiced-833538ee7f3a60a839304762dfc29b0881d19094.tar.gz
iced-833538ee7f3a60a839304762dfc29b0881d19094.tar.bz2
iced-833538ee7f3a60a839304762dfc29b0881d19094.zip
Leverage `DefaultStyle` traits instead of `Default`
Diffstat (limited to '')
-rw-r--r--widget/src/vertical_slider.rs8
1 files changed, 4 insertions, 4 deletions
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<F>(range: RangeInclusive<T>, value: T, on_change: F) -> Self
where
- Style<Theme>: 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