mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:47:35 +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
|
@ -147,7 +147,7 @@ void Slider::mousewheel_event(MouseEvent& event)
|
|||
wheel_delta /= abs(wheel_delta);
|
||||
|
||||
if (orientation() == Orientation::Horizontal)
|
||||
set_value(value() - wheel_delta * acceleration_modifier);
|
||||
decrease_slider_by(wheel_delta * acceleration_modifier);
|
||||
else
|
||||
increase_slider_by(wheel_delta * acceleration_modifier);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue