diff options
author | Denys Dmytriyenko <denis@denix.org> | 2009-03-17 14:32:59 -0400 |
---|---|---|
committer | Denys Dmytriyenko <denis@denix.org> | 2009-03-17 14:32:59 -0400 |
commit | 709c4d66e0b107ca606941b988bad717c0b45d9b (patch) | |
tree | 37ee08b1eb308f3b2b6426d5793545c38396b838 /recipes/gtk+/gtk+-2.10.14/spinbutton.patch | |
parent | fa6cd5a3b993f16c27de4ff82b42684516d433ba (diff) |
rename packages/ to recipes/ per earlier agreement
See links below for more details:
http://thread.gmane.org/gmane.comp.handhelds.openembedded/21326
http://thread.gmane.org/gmane.comp.handhelds.openembedded/21816
Signed-off-by: Denys Dmytriyenko <denis@denix.org>
Acked-by: Mike Westerhof <mwester@dls.net>
Acked-by: Philip Balister <philip@balister.org>
Acked-by: Khem Raj <raj.khem@gmail.com>
Acked-by: Marcin Juszkiewicz <hrw@openembedded.org>
Acked-by: Koen Kooi <koen@openembedded.org>
Acked-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Diffstat (limited to 'recipes/gtk+/gtk+-2.10.14/spinbutton.patch')
-rw-r--r-- | recipes/gtk+/gtk+-2.10.14/spinbutton.patch | 130 |
1 files changed, 130 insertions, 0 deletions
diff --git a/recipes/gtk+/gtk+-2.10.14/spinbutton.patch b/recipes/gtk+/gtk+-2.10.14/spinbutton.patch new file mode 100644 index 0000000000..c26dc6d93c --- /dev/null +++ b/recipes/gtk+/gtk+-2.10.14/spinbutton.patch @@ -0,0 +1,130 @@ +Index: gtk+-2.10.6/gtk/gtkspinbutton.c +=================================================================== +--- gtk+-2.10.6.orig/gtk/gtkspinbutton.c ++++ gtk+-2.10.6/gtk/gtkspinbutton.c +@@ -682,7 +682,7 @@ gtk_spin_button_size_allocate (GtkWidget + + spin = GTK_SPIN_BUTTON (widget); + arrow_size = spin_button_get_arrow_size (spin); +- panel_width = arrow_size + 2 * widget->style->xthickness; ++ panel_width = (2 * arrow_size) + 4 * widget->style->xthickness; + + widget->allocation = *allocation; + +@@ -815,19 +815,16 @@ gtk_spin_button_draw_arrow (GtkSpinButto + { + width = spin_button_get_arrow_size (spin_button) + 2 * widget->style->xthickness; + ++ y = widget->style->ythickness; ++ height = widget->requisition.height - (2 * y); ++ + if (arrow_type == GTK_ARROW_UP) + { + x = 0; +- y = 0; +- +- height = widget->requisition.height / 2; + } + else + { +- x = 0; +- y = widget->requisition.height / 2; +- +- height = (widget->requisition.height + 1) / 2; ++ x = width; + } + + if (spin_button_at_limit (spin_button, arrow_type)) +@@ -857,32 +854,17 @@ gtk_spin_button_draw_arrow (GtkSpinButto + shadow_type = GTK_SHADOW_OUT; + } + } +- ++ + gtk_paint_box (widget->style, spin_button->panel, + state_type, shadow_type, + NULL, widget, +- (arrow_type == GTK_ARROW_UP)? "spinbutton_up" : "spinbutton_down", ++ NULL, + x, y, width, height); + + height = widget->requisition.height; + +- if (arrow_type == GTK_ARROW_DOWN) +- { +- y = height / 2; +- height = height - y - 2; +- } +- else +- { +- y = 2; +- height = height / 2 - 2; +- } +- + width -= 3; +- +- if (widget && gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL) +- x = 2; +- else +- x = 1; ++ height -= 3; + + w = width / 2; + w -= w % 2 - 1; /* force odd */ +@@ -1062,7 +1044,7 @@ gtk_spin_button_button_press (GtkWidget + if (GTK_ENTRY (widget)->editable) + gtk_spin_button_update (spin); + +- if (event->y <= widget->requisition.height / 2) ++ if (event->x <= (spin_button_get_arrow_size (spin) + widget->style->xthickness)) + { + if (event->button == 1) + start_spinning (spin, GTK_ARROW_UP, spin->adjustment->step_increment); +@@ -1097,44 +1079,11 @@ gtk_spin_button_button_release (GtkWidge + + arrow_size = spin_button_get_arrow_size (spin); + +- if (event->button == spin->button) +- { +- int click_child = spin->click_child; ++ gtk_spin_button_stop_spinning (spin); + +- gtk_spin_button_stop_spinning (spin); +- +- if (event->button == 3) +- { +- if (event->y >= 0 && event->x >= 0 && +- event->y <= widget->requisition.height && +- event->x <= arrow_size + 2 * widget->style->xthickness) +- { +- if (click_child == GTK_ARROW_UP && +- event->y <= widget->requisition.height / 2) +- { +- gdouble diff; +- +- diff = spin->adjustment->upper - spin->adjustment->value; +- if (diff > EPSILON) +- gtk_spin_button_real_spin (spin, diff); +- } +- else if (click_child == GTK_ARROW_DOWN && +- event->y > widget->requisition.height / 2) +- { +- gdouble diff; +- +- diff = spin->adjustment->value - spin->adjustment->lower; +- if (diff > EPSILON) +- gtk_spin_button_real_spin (spin, -diff); +- } +- } +- } +- spin_button_redraw (spin); ++ spin_button_redraw (spin); + +- return TRUE; +- } +- else +- return GTK_WIDGET_CLASS (gtk_spin_button_parent_class)->button_release_event (widget, event); ++ return TRUE; + } + + static gint |