Commit cc375a49 authored by Owen Taylor's avatar Owen Taylor Committed by Owen Taylor
Browse files

Handle inverted ranges correctly (#85436, fix from Norihiro UMEDA)

Tue Jul 30 19:09:46 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkrange.c (gtk_range_scroll_event): Handle
        inverted ranges correctly (#85436, fix from
        Norihiro UMEDA)
parent fceae3c3
Tue Jul 30 19:09:46 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrange.c (gtk_range_scroll_event): Handle
inverted ranges correctly (#85436, fix from
Norihiro UMEDA)
Tue Jul 30 16:36:53 2002 Owen Taylor <otaylor@redhat.com>
* tests/testgtk.c: Fix bug in the selection mode option
......
Tue Jul 30 19:09:46 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrange.c (gtk_range_scroll_event): Handle
inverted ranges correctly (#85436, fix from
Norihiro UMEDA)
Tue Jul 30 16:36:53 2002 Owen Taylor <otaylor@redhat.com>
* tests/testgtk.c: Fix bug in the selection mode option
......
Tue Jul 30 19:09:46 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrange.c (gtk_range_scroll_event): Handle
inverted ranges correctly (#85436, fix from
Norihiro UMEDA)
Tue Jul 30 16:36:53 2002 Owen Taylor <otaylor@redhat.com>
* tests/testgtk.c: Fix bug in the selection mode option
......
Tue Jul 30 19:09:46 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrange.c (gtk_range_scroll_event): Handle
inverted ranges correctly (#85436, fix from
Norihiro UMEDA)
Tue Jul 30 16:36:53 2002 Owen Taylor <otaylor@redhat.com>
* tests/testgtk.c: Fix bug in the selection mode option
......
Tue Jul 30 19:09:46 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrange.c (gtk_range_scroll_event): Handle
inverted ranges correctly (#85436, fix from
Norihiro UMEDA)
Tue Jul 30 16:36:53 2002 Owen Taylor <otaylor@redhat.com>
* tests/testgtk.c: Fix bug in the selection mode option
......
Tue Jul 30 19:09:46 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrange.c (gtk_range_scroll_event): Handle
inverted ranges correctly (#85436, fix from
Norihiro UMEDA)
Tue Jul 30 16:36:53 2002 Owen Taylor <otaylor@redhat.com>
* tests/testgtk.c: Fix bug in the selection mode option
......
......@@ -1360,12 +1360,15 @@ gtk_range_scroll_event (GtkWidget *widget,
if (GTK_WIDGET_REALIZED (range))
{
GtkAdjustment *adj = GTK_RANGE (range)->adjustment;
gdouble new_value = adj->value + ((event->direction == GDK_SCROLL_UP ||
event->direction == GDK_SCROLL_LEFT) ?
-adj->page_increment / 2:
adj->page_increment / 2);
gtk_range_internal_set_value (range, new_value);
gdouble increment = ((event->direction == GDK_SCROLL_UP ||
event->direction == GDK_SCROLL_LEFT) ?
-adj->page_increment / 2:
adj->page_increment / 2);
if (range->inverted)
increment = -increment;
gtk_range_internal_set_value (range, adj->value + increment);
/* Policy DELAYED makes sense with scroll events,
* but DISCONTINUOUS doesn't, so we update immediately
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment