summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGUI/SpinBox.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibGUI/SpinBox.cpp')
-rw-r--r--Userland/Libraries/LibGUI/SpinBox.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/Userland/Libraries/LibGUI/SpinBox.cpp b/Userland/Libraries/LibGUI/SpinBox.cpp
index 35967afab5..f0c82b935e 100644
--- a/Userland/Libraries/LibGUI/SpinBox.cpp
+++ b/Userland/Libraries/LibGUI/SpinBox.cpp
@@ -105,7 +105,10 @@ void SpinBox::set_range(int min, int max)
void SpinBox::mousewheel_event(MouseEvent& event)
{
- set_value(m_value - event.wheel_delta());
+ auto wheel_delta = event.wheel_delta() / abs(event.wheel_delta());
+ if (event.modifiers() == KeyModifier::Mod_Ctrl)
+ wheel_delta *= 6;
+ set_value(m_value - wheel_delta);
}
void SpinBox::resize_event(ResizeEvent& event)