mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-19 16:59:47 +00:00
Everywhere: Use 'increase_slider_by()' method from AbstractSlider
This method help us to avoid repeating the pattern 'set_value(value() + delta)'.
This commit is contained in:
parent
8b8f404146
commit
d53e1fa1fa
Notes:
sideshowbarker
2024-07-17 21:55:29 +09:00
Author: https://github.com/elyse0
Commit: d53e1fa1fa
Pull-request: https://github.com/SerenityOS/serenity/pull/11163
Reviewed-by: https://github.com/kleinesfilmroellchen ✅
Reviewed-by: https://github.com/metmo ✅
12 changed files with 19 additions and 19 deletions
|
@ -248,7 +248,7 @@ void LayerListWidget::on_automatic_scrolling_timer_fired()
|
|||
if (vertical_scrollbar().is_max() && m_automatic_scroll_delta.y() > 0)
|
||||
return;
|
||||
|
||||
vertical_scrollbar().set_value(vertical_scrollbar().value() + m_automatic_scroll_delta.y());
|
||||
vertical_scrollbar().increase_slider_by(m_automatic_scroll_delta.y());
|
||||
gadget.movement_delta.set_y(gadget.movement_delta.y() + m_automatic_scroll_delta.y());
|
||||
|
||||
auto inner_rect_max_height = widget_inner_rect().height() - 2 + vertical_scrollbar().max();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue