mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:17:45 +00:00
Everywhere: Use 'decrease_slider_by()' method from AbstractSlider
The same idea as 'increase_slider_by()', it helps us to avoid repeating the pattern 'set_value(value() - delta)'.
This commit is contained in:
parent
d53e1fa1fa
commit
086615535f
8 changed files with 10 additions and 10 deletions
|
@ -329,7 +329,7 @@ void Scrollbar::scroll_by_page(const Gfx::IntPoint& click_position)
|
|||
|
||||
if (click_position.primary_offset_for_orientation(orientation()) < scrubber_rect().primary_offset_for_orientation(orientation())) {
|
||||
gutter_click_state = GutterClickState::BeforeScrubber;
|
||||
set_value(value() - page_increment);
|
||||
decrease_slider_by(page_increment);
|
||||
} else {
|
||||
gutter_click_state = GutterClickState::AfterScrubber;
|
||||
increase_slider_by(page_increment);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue