[gthumb] fixed gth_toggle_menu_tool_button orientation



commit 523b22b0836315d1fb0364c7639a6bfa2dbf8258
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Fri Jul 16 21:04:32 2010 +0200

    fixed gth_toggle_menu_tool_button orientation

 gthumb/gth-toggle-menu-tool-button.c |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/gthumb/gth-toggle-menu-tool-button.c b/gthumb/gth-toggle-menu-tool-button.c
index 60129e5..09b6711 100644
--- a/gthumb/gth-toggle-menu-tool-button.c
+++ b/gthumb/gth-toggle-menu-tool-button.c
@@ -114,7 +114,8 @@ gth_toggle_menu_tool_button_construct_contents (GtkToolItem *tool_item)
 	GtkWidget               *arrow;
 	GtkWidget               *arrow_align;
 	GtkIconSize              icon_size;
-	GtkWidget               *box = NULL;
+	GtkWidget               *main_box;
+	GtkWidget               *box;
 	guint                    icon_spacing;
 	GtkOrientation           text_orientation = GTK_ORIENTATION_HORIZONTAL;
 	GtkSizeGroup            *size_group = NULL;
@@ -278,14 +279,18 @@ gth_toggle_menu_tool_button_construct_contents (GtkToolItem *tool_item)
 	if (size_group != NULL)
 		gtk_size_group_add_widget (size_group, arrow_align);
 
-	if (text_orientation == GTK_ORIENTATION_HORIZONTAL)
+	main_box = gtk_hbox_new (FALSE, icon_spacing);
+	gtk_widget_show (main_box);
+	gtk_container_add (GTK_CONTAINER (button->priv->toggle_button), main_box);
+
+	if (style == GTK_TOOLBAR_BOTH_HORIZ)
 		box = gtk_hbox_new (FALSE, icon_spacing);
 	else
 		box = gtk_vbox_new (FALSE, icon_spacing);
 	gtk_widget_show (box);
-	gtk_container_add (GTK_CONTAINER (button->priv->toggle_button), box);
 
-	gtk_box_pack_end (GTK_BOX (box), arrow_align, FALSE, FALSE, 0);
+	gtk_box_pack_start (GTK_BOX (main_box), box, TRUE, TRUE, 0);
+	gtk_box_pack_end (GTK_BOX (main_box), arrow_align, FALSE, FALSE, 0);
 
 	switch (style) {
 	case GTK_TOOLBAR_ICONS:



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]