Merge pull request #1669 from GyulyVGC/master

Added scrollable style `focused` to be displayed when mouse is over the scrollable area
This commit is contained in:
Héctor Ramón 2023-03-27 16:17:02 +02:00 committed by GitHub
commit 4e409bb383
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 76 additions and 38 deletions

View file

@ -857,8 +857,8 @@ pub fn draw<Renderer>(
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(style)
} else if mouse_over_scrollable {
theme.hovered(style, mouse_over_y_scrollbar)
} else {
theme.active(style)
};
@ -870,8 +870,8 @@ pub fn draw<Renderer>(
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_horizontal(style)
} else if mouse_over_scrollable {
theme.hovered_horizontal(style, mouse_over_x_scrollbar)
} else {
theme.active_horizontal(style)
};