summaryrefslogtreecommitdiff
path: root/Userland/Applications/Piano/RollWidget.cpp
diff options
context:
space:
mode:
authorElyse <kevincristian@outlook.com>2021-12-28 21:47:26 -0600
committerAndreas Kling <kling@serenityos.org>2021-12-30 14:31:50 +0100
commitd53e1fa1fa62cdbb5ead03c5a52f5690d86235a6 (patch)
treeee6b5f7df6eb8676d58bac0c380ef09afd09f825 /Userland/Applications/Piano/RollWidget.cpp
parent8b8f4041466c40acce1adb14882de752020082fb (diff)
downloadserenity-d53e1fa1fa62cdbb5ead03c5a52f5690d86235a6.zip
Everywhere: Use 'increase_slider_by()' method from AbstractSlider
This method help us to avoid repeating the pattern 'set_value(value() + delta)'.
Diffstat (limited to 'Userland/Applications/Piano/RollWidget.cpp')
-rw-r--r--Userland/Applications/Piano/RollWidget.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Applications/Piano/RollWidget.cpp b/Userland/Applications/Piano/RollWidget.cpp
index d2c6312dbd..915da0e294 100644
--- a/Userland/Applications/Piano/RollWidget.cpp
+++ b/Userland/Applications/Piano/RollWidget.cpp
@@ -239,7 +239,7 @@ void RollWidget::mouseup_event([[maybe_unused]] GUI::MouseEvent& event)
void RollWidget::mousewheel_event(GUI::MouseEvent& event)
{
if (event.modifiers() & KeyModifier::Mod_Shift) {
- horizontal_scrollbar().set_value(horizontal_scrollbar().value() + (event.wheel_delta() * horizontal_scroll_sensitivity));
+ horizontal_scrollbar().increase_slider_by(event.wheel_delta() * horizontal_scroll_sensitivity);
return;
}