diff options
author | Daniel Boles <dboles@src.gnome.org> | 2018-01-01 14:31:56 +0000 |
---|---|---|
committer | Daniel Boles <dboles.src@gmail.com> | 2018-04-18 18:36:55 +0100 |
commit | 45c8c8f93457fb7d793b3ba4182e57ede0aeabb7 (patch) | |
tree | 44f3404d7a7eea82f527ef2a42123f4ec937d90f /gtk/gtkrange.c | |
parent | 6985dde3206fe0562ea7adbe18ae9acd77bff6a4 (diff) | |
download | gtk+-45c8c8f93457fb7d793b3ba4182e57ede0aeabb7.tar.gz |
Range: Make down/up keys act like down/up scrolls
Before now, down/up keys on H Ranges would increase/decrease value resp,
which is unintuitive & worse, contradicts what we already do for scrolls
Fix simply by moving to the new should_invert_move() as scrolls just did
– which also gets us the other benefits explained in the last 2 commits.
https://bugzilla.gnome.org/show_bug.cgi?id=407242
https://bugzilla.gnome.org/show_bug.cgi?id=791802
Diffstat (limited to 'gtk/gtkrange.c')
-rw-r--r-- | gtk/gtkrange.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/gtk/gtkrange.c b/gtk/gtkrange.c index f064a1d99f..9822935941 100644 --- a/gtk/gtkrange.c +++ b/gtk/gtkrange.c @@ -2494,28 +2494,28 @@ gtk_range_scroll (GtkRange *range, switch (scroll) { case GTK_SCROLL_STEP_LEFT: - if (should_invert (range)) + if (should_invert_move (range, GTK_ORIENTATION_HORIZONTAL)) step_forward (range); else step_back (range); break; case GTK_SCROLL_STEP_UP: - if (should_invert (range)) + if (should_invert_move (range, GTK_ORIENTATION_VERTICAL)) step_forward (range); else step_back (range); break; case GTK_SCROLL_STEP_RIGHT: - if (should_invert (range)) + if (should_invert_move (range, GTK_ORIENTATION_HORIZONTAL)) step_back (range); else step_forward (range); break; case GTK_SCROLL_STEP_DOWN: - if (should_invert (range)) + if (should_invert_move (range, GTK_ORIENTATION_VERTICAL)) step_back (range); else step_forward (range); @@ -2530,28 +2530,28 @@ gtk_range_scroll (GtkRange *range, break; case GTK_SCROLL_PAGE_LEFT: - if (should_invert (range)) + if (should_invert_move (range, GTK_ORIENTATION_HORIZONTAL)) page_forward (range); else page_back (range); break; case GTK_SCROLL_PAGE_UP: - if (should_invert (range)) + if (should_invert_move (range, GTK_ORIENTATION_VERTICAL)) page_forward (range); else page_back (range); break; case GTK_SCROLL_PAGE_RIGHT: - if (should_invert (range)) + if (should_invert_move (range, GTK_ORIENTATION_HORIZONTAL)) page_back (range); else page_forward (range); break; case GTK_SCROLL_PAGE_DOWN: - if (should_invert (range)) + if (should_invert_move (range, GTK_ORIENTATION_VERTICAL)) page_back (range); else page_forward (range); |