[gtk+] scalebutton: Invert smooth scroll dy when adding to the current value
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] scalebutton: Invert smooth scroll dy when adding to the current value
- Date: Tue, 23 Sep 2014 00:28:43 +0000 (UTC)
commit f8f74b59e38b402bf78ac8b454a8f26e839f8349
Author: Carlos Garnacho <carlosg gnome org>
Date: Thu Sep 18 13:48:35 2014 +0200
scalebutton: Invert smooth scroll dy when adding to the current value
On regular scrolling (ie. not natural scrolling), positive deltas in the
Y axis (downwards) should actually move the value towards the adjustment
minimum value to be more intuitive. This also makes the scrolling
directions match between the button and the popped up scale.
https://bugzilla.gnome.org/show_bug.cgi?id=736830
gtk/gtkscalebutton.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkscalebutton.c b/gtk/gtkscalebutton.c
index 24976b0..f797399 100644
--- a/gtk/gtkscalebutton.c
+++ b/gtk/gtkscalebutton.c
@@ -794,7 +794,7 @@ gtk_scale_button_scroll (GtkWidget *widget,
}
else if (event->direction == GDK_SCROLL_SMOOTH)
{
- d += event->delta_y * gtk_adjustment_get_step_increment (adjustment);
+ d -= event->delta_y * gtk_adjustment_get_step_increment (adjustment);
d = CLAMP (d, gtk_adjustment_get_lower (adjustment),
gtk_adjustment_get_upper (adjustment));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]