summaryrefslogtreecommitdiffstats
path: root/src/ui/widget/spinbutton.cpp
diff options
context:
space:
mode:
authorJabiertxof <jabier.arraiza@marker.es>2019-06-13 00:58:17 +0000
committerJabiertxof <jabier.arraiza@marker.es>2019-06-13 00:58:17 +0000
commit87a354cff60a172951c090e142f8fe619fd1f047 (patch)
tree39c57d78cd01f97e43119c060b92790159dd4633 /src/ui/widget/spinbutton.cpp
parentTry to fix issue with focus with thomas and add also stops to combos and unit... (diff)
downloadinkscape-87a354cff60a172951c090e142f8fe619fd1f047.tar.gz
inkscape-87a354cff60a172951c090e142f8fe619fd1f047.zip
Fix step value
Diffstat (limited to 'src/ui/widget/spinbutton.cpp')
-rw-r--r--src/ui/widget/spinbutton.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/ui/widget/spinbutton.cpp b/src/ui/widget/spinbutton.cpp
index 81f20804b..48da5c8f5 100644
--- a/src/ui/widget/spinbutton.cpp
+++ b/src/ui/widget/spinbutton.cpp
@@ -76,16 +76,16 @@ bool SpinButton::on_scroll_event(GdkEventScroll *event)
}
double step, page;
get_increments(step, page);
- /*if (event->state & GDK_CONTROL_MASK) {
- page = step;
- } */
+ if (event->state & GDK_CONTROL_MASK) {
+ step = page;
+ }
double change = 0.0;
if (event->direction == GDK_SCROLL_UP) {
change = step;
} else if (event->direction == GDK_SCROLL_DOWN) {
- change = step * -1.0;
+ change = -step;
} else if (event->direction == GDK_SCROLL_SMOOTH) {
- double delta_y_clamped = CLAMP(event->delta_y, step * -1.0, step); // values > 1 result in excessive changes
+ double delta_y_clamped = CLAMP(event->delta_y, -1 , 1); // values > 1 result in excessive changes
change = step * -delta_y_clamped;
} else {
return false;