LibWeb: Enlarge scrollbars that are interacting with the mouse

When a scrollbar is not interacting with the mouse, we now draw the
scrollbar slightly slimmer. When the mouse enters the space occupied
by the scrollbar, we enlarge it for easier mouse interactivity.
This commit is contained in:
Timothy Flynn 2025-04-21 08:29:51 -04:00 committed by Tim Flynn
commit 843468dbf8
Notes: github-actions[bot] 2025-04-22 15:30:31 +00:00
2 changed files with 61 additions and 8 deletions

View file

@ -278,6 +278,8 @@ private:
virtual DispatchEventOfSameName handle_mouseup(Badge<EventHandler>, CSSPixelPoint, unsigned button, unsigned modifiers) override;
virtual DispatchEventOfSameName handle_mousemove(Badge<EventHandler>, CSSPixelPoint, unsigned buttons, unsigned modifiers) override;
bool scrollbar_contains_mouse_position(ScrollDirection, CSSPixelPoint);
OwnPtr<StackingContext> m_stacking_context;
Optional<OverflowData> m_overflow_data;
@ -304,6 +306,8 @@ private:
Optional<CSSPixelPoint> m_last_mouse_tracking_position;
Optional<ScrollDirection> m_scroll_thumb_dragging_direction;
bool m_draw_enlarged_horizontal_scrollbar { false };
bool m_draw_enlarged_vertical_scrollbar { false };
ResolvedBackground m_resolved_background;