From c407b4504cd5e7dcb04a8fd31ad0400c891fc3e1 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Mon, 27 Mar 2023 15:51:32 +0200 Subject: Introduce `is_mouse_over_scrollbar` to `StyleSheet::hovered` for `Scrollable` --- native/src/widget/scrollable.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'native/src/widget') diff --git a/native/src/widget/scrollable.rs b/native/src/widget/scrollable.rs index be81bee1..d9cdf296 100644 --- a/native/src/widget/scrollable.rs +++ b/native/src/widget/scrollable.rs @@ -857,10 +857,8 @@ pub fn draw( if let Some(scrollbar) = scrollbars.y { let style = if state.y_scroller_grabbed_at.is_some() { theme.dragging(style) - } else if mouse_over_y_scrollbar { - theme.hovered_scrollbar(style) } else if mouse_over_scrollable { - theme.hovered(style) + theme.hovered(style, mouse_over_y_scrollbar) } else { theme.active(style) }; @@ -872,10 +870,8 @@ pub fn draw( if let Some(scrollbar) = scrollbars.x { let style = if state.x_scroller_grabbed_at.is_some() { theme.dragging_horizontal(style) - } else if mouse_over_x_scrollbar { - theme.hovered_scrollbar_horizontal(style) } else if mouse_over_scrollable { - theme.hovered_horizontal(style) + theme.hovered_horizontal(style, mouse_over_x_scrollbar) } else { theme.active_horizontal(style) }; -- cgit