diff options
author | Elyse <kevincristian@outlook.com> | 2021-10-31 12:38:15 -0600 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-12-30 14:31:50 +0100 |
commit | 173a84a2efdb6fa28b4bcafb06e5f954a16f9a36 (patch) | |
tree | 5186dced57c62e90adb19776bf26a34b43e2d6df /Userland/Libraries/LibGUI/Slider.cpp | |
parent | 0d660b27ae4368d14248399ebe4e3d1128f5479a (diff) | |
download | serenity-173a84a2efdb6fa28b4bcafb06e5f954a16f9a36.zip |
LibGUI+SoundPlayer: Use 'decrease_slider_by_page_steps()' method
This method allow us to avoid repeating the pattern
'set_value(value() - page_step() * page_number)'.
Diffstat (limited to 'Userland/Libraries/LibGUI/Slider.cpp')
-rw-r--r-- | Userland/Libraries/LibGUI/Slider.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibGUI/Slider.cpp b/Userland/Libraries/LibGUI/Slider.cpp index a30cecbcb9..15998aa433 100644 --- a/Userland/Libraries/LibGUI/Slider.cpp +++ b/Userland/Libraries/LibGUI/Slider.cpp @@ -106,7 +106,7 @@ void Slider::mousedown_event(MouseEvent& event) if (mouse_offset > knob_last_edge) increase_slider_by_page_steps(1); else if (mouse_offset < knob_first_edge) - set_value(value() - page_step()); + decrease_slider_by_page_steps(1); } } return Widget::mousedown_event(event); |