1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 03:57:43 +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:
Elyse 2021-12-28 21:47:26 -06:00 committed by Andreas Kling
parent 8b8f404146
commit d53e1fa1fa
12 changed files with 19 additions and 19 deletions

View file

@ -149,7 +149,7 @@ void Slider::mousewheel_event(MouseEvent& event)
if (orientation() == Orientation::Horizontal)
set_value(value() - wheel_delta * acceleration_modifier);
else
set_value(value() + wheel_delta * acceleration_modifier);
increase_slider_by(wheel_delta * acceleration_modifier);
Widget::mousewheel_event(event);
}