mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-25 10:48:41 +00:00
This commit adds a timer to AbstractScrollableWidget that can be used when implementing automatic scrolling. By overriding on_automatic_scrolling_timer_fired() we can calculate the scrolling delta when dragging objects, and redraw as needed. A helper function, automatic_scroll_delta_from_position() gives us a delta that we can use to calculate speed and direction. By default m_autoscroll_threshold is 20 pixels from the edge, and gives a linear change in scroll delta.
10 KiB
10 KiB