1 --- gtk+-2.4.3/gtk/gtkspinbutton.c.old 2004-04-22 14:49:27.000000000 +0100
2 +++ gtk+-2.4.3/gtk/gtkspinbutton.c 2004-06-30 21:48:18.000000000 +0100
5 spin = GTK_SPIN_BUTTON (widget);
6 arrow_size = spin_button_get_arrow_size (spin);
7 - panel_width = arrow_size + 2 * widget->style->xthickness;
8 + panel_width = (2 * arrow_size) + 4 * widget->style->xthickness;
10 widget->allocation = *allocation;
14 width = spin_button_get_arrow_size (spin_button) + 2 * widget->style->xthickness;
16 + y = widget->style->ythickness;
17 + height = widget->requisition.height - (2 * y);
19 if (arrow_type == GTK_ARROW_UP)
24 - height = widget->requisition.height / 2;
29 - y = widget->requisition.height / 2;
31 - height = (widget->requisition.height + 1) / 2;
35 if (spin_button_at_limit (spin_button, arrow_type))
37 shadow_type = GTK_SHADOW_OUT;
42 gtk_paint_box (widget->style, spin_button->panel,
43 state_type, shadow_type,
45 - (arrow_type == GTK_ARROW_UP)? "spinbutton_up" : "spinbutton_down",
49 height = widget->requisition.height;
51 - if (arrow_type == GTK_ARROW_DOWN)
54 - height = height - y - 2;
59 - height = height / 2 - 2;
64 - if (widget && gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL)
71 w -= w % 2 - 1; /* force odd */
73 if (GTK_ENTRY (widget)->editable)
74 gtk_spin_button_update (spin);
76 - if (event->y <= widget->requisition.height / 2)
77 + if (event->x <= (spin_button_get_arrow_size (spin) + widget->style->xthickness))
79 if (event->button == 1)
80 start_spinning (spin, GTK_ARROW_UP, spin->adjustment->step_increment);
81 @@ -1143,44 +1125,11 @@
83 arrow_size = spin_button_get_arrow_size (spin);
85 - if (event->button == spin->button)
87 - int click_child = spin->click_child;
88 + gtk_spin_button_stop_spinning (spin);
90 - gtk_spin_button_stop_spinning (spin);
92 - if (event->button == 3)
94 - if (event->y >= 0 && event->x >= 0 &&
95 - event->y <= widget->requisition.height &&
96 - event->x <= arrow_size + 2 * widget->style->xthickness)
98 - if (click_child == GTK_ARROW_UP &&
99 - event->y <= widget->requisition.height / 2)
103 - diff = spin->adjustment->upper - spin->adjustment->value;
104 - if (diff > EPSILON)
105 - gtk_spin_button_real_spin (spin, diff);
107 - else if (click_child == GTK_ARROW_DOWN &&
108 - event->y > widget->requisition.height / 2)
112 - diff = spin->adjustment->value - spin->adjustment->lower;
113 - if (diff > EPSILON)
114 - gtk_spin_button_real_spin (spin, -diff);
118 - spin_button_redraw (spin);
119 + spin_button_redraw (spin);
124 - return GTK_WIDGET_CLASS (parent_class)->button_release_event (widget, event);