mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-07 08:39:22 +00:00
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:
parent
9ef3fd0922
commit
843468dbf8
Notes:
github-actions[bot]
2025-04-22 15:30:31 +00:00
Author: https://github.com/trflynn89
Commit: 843468dbf8
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4417
2 changed files with 61 additions and 8 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue