1 Index: gtk+-2.10.6/gtk/gtkspinbutton.c
2 ===================================================================
3 --- gtk+-2.10.6.orig/gtk/gtkspinbutton.c
4 +++ gtk+-2.10.6/gtk/gtkspinbutton.c
5 @@ -682,7 +682,7 @@ gtk_spin_button_size_allocate (GtkWidget
7 spin = GTK_SPIN_BUTTON (widget);
8 arrow_size = spin_button_get_arrow_size (spin);
9 - panel_width = arrow_size + 2 * widget->style->xthickness;
10 + panel_width = (2 * arrow_size) + 4 * widget->style->xthickness;
12 widget->allocation = *allocation;
14 @@ -815,19 +815,16 @@ gtk_spin_button_draw_arrow (GtkSpinButto
16 width = spin_button_get_arrow_size (spin_button) + 2 * widget->style->xthickness;
18 + y = widget->style->ythickness;
19 + height = widget->requisition.height - (2 * y);
21 if (arrow_type == GTK_ARROW_UP)
26 - height = widget->requisition.height / 2;
31 - y = widget->requisition.height / 2;
33 - height = (widget->requisition.height + 1) / 2;
37 if (spin_button_at_limit (spin_button, arrow_type))
38 @@ -857,32 +854,17 @@ gtk_spin_button_draw_arrow (GtkSpinButto
39 shadow_type = GTK_SHADOW_OUT;
44 gtk_paint_box (widget->style, spin_button->panel,
45 state_type, shadow_type,
47 - (arrow_type == GTK_ARROW_UP)? "spinbutton_up" : "spinbutton_down",
51 height = widget->requisition.height;
53 - if (arrow_type == GTK_ARROW_DOWN)
56 - height = height - y - 2;
61 - height = height / 2 - 2;
66 - if (widget && gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL)
73 w -= w % 2 - 1; /* force odd */
74 @@ -1062,7 +1044,7 @@ gtk_spin_button_button_press (GtkWidget
75 if (GTK_ENTRY (widget)->editable)
76 gtk_spin_button_update (spin);
78 - if (event->y <= widget->requisition.height / 2)
79 + if (event->x <= (spin_button_get_arrow_size (spin) + widget->style->xthickness))
81 if (event->button == 1)
82 start_spinning (spin, GTK_ARROW_UP, spin->adjustment->step_increment);
83 @@ -1097,44 +1079,11 @@ gtk_spin_button_button_release (GtkWidge
85 arrow_size = spin_button_get_arrow_size (spin);
87 - if (event->button == spin->button)
89 - int click_child = spin->click_child;
90 + gtk_spin_button_stop_spinning (spin);
92 - gtk_spin_button_stop_spinning (spin);
94 - if (event->button == 3)
96 - if (event->y >= 0 && event->x >= 0 &&
97 - event->y <= widget->requisition.height &&
98 - event->x <= arrow_size + 2 * widget->style->xthickness)
100 - if (click_child == GTK_ARROW_UP &&
101 - event->y <= widget->requisition.height / 2)
105 - diff = spin->adjustment->upper - spin->adjustment->value;
106 - if (diff > EPSILON)
107 - gtk_spin_button_real_spin (spin, diff);
109 - else if (click_child == GTK_ARROW_DOWN &&
110 - event->y > widget->requisition.height / 2)
114 - diff = spin->adjustment->value - spin->adjustment->lower;
115 - if (diff > EPSILON)
116 - gtk_spin_button_real_spin (spin, -diff);
120 - spin_button_redraw (spin);
121 + spin_button_redraw (spin);
126 - return GTK_WIDGET_CLASS (gtk_spin_button_parent_class)->button_release_event (widget, event);