[maemo-commits] [maemo-commits] r13931 - in projects/haf/trunk/gtk+: . gtk
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Thu Sep 20 14:07:39 EEST 2007
- Previous message: [maemo-commits] r13930 - in projects/haf/trunk/hildon-1: . examples src
- Next message: [maemo-commits] r13932 - in projects/haf/branches/hildon-control-panel/refactoring: . src
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: tko Date: 2007-09-20 14:07:37 +0300 (Thu, 20 Sep 2007) New Revision: 13931 Modified: projects/haf/trunk/gtk+/ChangeLog projects/haf/trunk/gtk+/gtk/gtkhbbox.c Log: 2007-09-20 Tommi Komulainen <tommi.komulainen at nokia.com> * gtk/gtkhbbox.c (gtk_hbutton_box_size_allocate): Replace somewhat obscure defines with real variables. Modified: projects/haf/trunk/gtk+/ChangeLog =================================================================== --- projects/haf/trunk/gtk+/ChangeLog 2007-09-20 10:50:28 UTC (rev 13930) +++ projects/haf/trunk/gtk+/ChangeLog 2007-09-20 11:07:37 UTC (rev 13931) @@ -1,3 +1,8 @@ +2007-09-20 Tommi Komulainen <tommi.komulainen at nokia.com> + + * gtk/gtkhbbox.c (gtk_hbutton_box_size_allocate): Replace somewhat + obscure defines with real variables. + 2007-09-19 13:58:27 Tim Janik <timj at imendio.com> * gtk/gtkcontainer.h, gtk/gtkcontainer.c: added _gtk_container_post_size_allocate() Modified: projects/haf/trunk/gtk+/gtk/gtkhbbox.c =================================================================== --- projects/haf/trunk/gtk+/gtk/gtkhbbox.c 2007-09-20 10:50:28 UTC (rev 13930) +++ projects/haf/trunk/gtk+/gtk/gtkhbbox.c 2007-09-20 11:07:37 UTC (rev 13931) @@ -305,6 +305,7 @@ gint x, y; gint secondary_x; gint nvis_children, n_secondaries, childspacing; + gint primary_spacing, secondary_spacing; gint n_primaries, inner_width; GList *children; GtkBoxChild *child; @@ -324,8 +325,6 @@ n_primaries = nvis_children - n_secondaries; inner_width = allocation->width - 2 * GTK_CONTAINER (widget)->border_width; -#define primary_spacing (childspacing * (n_primaries - 1)) -#define secondary_spacing (childspacing * (n_secondaries - 1)) layout = GTK_BUTTON_BOX (widget)->layout_style != GTK_BUTTONBOX_DEFAULT_STYLE ? GTK_BUTTON_BOX (widget)->layout_style : default_layout_style; @@ -335,6 +334,7 @@ case GTK_BUTTONBOX_SPREAD: childspacing = (inner_width - (primary_width + secondary_width)) / (nvis_children + 1); + primary_spacing = childspacing * (n_primaries - 1); x = allocation->x + GTK_CONTAINER (widget)->border_width + childspacing; secondary_x = x + primary_width + primary_spacing + childspacing; break; @@ -343,6 +343,7 @@ { childspacing = (inner_width - (primary_width + secondary_width)) / (nvis_children - 1); + primary_spacing = childspacing * (n_primaries - 1); x = allocation->x + GTK_CONTAINER (widget)->border_width; secondary_x = x + primary_width + primary_spacing + childspacing; } @@ -355,6 +356,7 @@ break; case GTK_BUTTONBOX_START: childspacing = GTK_BOX (widget)->spacing; + secondary_spacing = childspacing * (n_secondaries - 1); x = allocation->x + GTK_CONTAINER (widget)->border_width; secondary_x = allocation->x + allocation->width - secondary_width @@ -363,6 +365,7 @@ break; case GTK_BUTTONBOX_END: childspacing = GTK_BOX (widget)->spacing; + primary_spacing = childspacing * (n_primaries - 1); x = allocation->x + allocation->width - primary_width - primary_spacing @@ -371,6 +374,8 @@ break; case GTK_BUTTONBOX_CENTER: childspacing = GTK_BOX (widget)->spacing; + primary_spacing = childspacing * (n_primaries - 1); + secondary_spacing = childspacing * (n_secondaries - 1); x = allocation->x + (allocation->width - (primary_width + primary_spacing))/2 @@ -381,8 +386,6 @@ g_assert_not_reached(); break; } -#undef primary_spacing -#undef secondary_spacing y = allocation->y + (allocation->height - child_height) / 2;
- Previous message: [maemo-commits] r13930 - in projects/haf/trunk/hildon-1: . examples src
- Next message: [maemo-commits] r13932 - in projects/haf/branches/hildon-control-panel/refactoring: . src
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]