Introduce Custom variants for every style in the built-in Theme
This commit is contained in:
parent
8102f96f12
commit
18fb74f200
34 changed files with 576 additions and 286 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue