summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Boles <dboles.src@gmail.com>2018-05-21 19:42:57 +0100
committerDaniel Boles <dboles.src@gmail.com>2018-05-21 20:07:42 +0100
commit4c39e06f45856661d0a321f42327890a4939e7d3 (patch)
treef2e40dc54707095770407149f0ad7d3e8c1aea1f
parent87f454ebd389960694ab4a20319efa6857eadc20 (diff)
downloadgtk+-4c39e06f45856661d0a321f42327890a4939e7d3.tar.gz
Range: Up should only mean ++ if we are a GtkScale
The last round of patches to get the desired direction of value move in response to scrolls/keypresses on scales had the inadvertent side effect of giving the opposite direction on scrollbars. Seeing as gtkrange.c is already a collection of hacks, add another so that fix only holds if the instance is a GtkScale, since that is what those patches were aimed at. Close https://gitlab.gnome.org/GNOME/gtk/issues/1065
-rw-r--r--gtk/gtkrange.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gtk/gtkrange.c b/gtk/gtkrange.c
index 317843698b..dc495631cb 100644
--- a/gtk/gtkrange.c
+++ b/gtk/gtkrange.c
@@ -959,8 +959,8 @@ should_invert_move (GtkRange *range,
if (move_orientation == priv->orientation)
return should_invert (range);
- /* H range/V move: Always invert, so down/up always dec/increase the value */
- if (priv->orientation == GTK_ORIENTATION_HORIZONTAL)
+ /* H scale/V move: Always invert, so down/up always dec/increase the value */
+ if (priv->orientation == GTK_ORIENTATION_HORIZONTAL && GTK_IS_SCALE (range))
return TRUE;
/* V range/H move: Left/right always dec/increase the value */