From 99d8f4bdb376db12b31618491332aad82fd429e7 Mon Sep 17 00:00:00 2001 From: "Jon A. Cruz" Date: Sun, 25 Apr 2010 01:56:03 -0700 Subject: [PATCH] Pack combo boxes into GtkAlignment for natural size when used in toolbars. --- src/ink-comboboxentry-action.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/ink-comboboxentry-action.cpp b/src/ink-comboboxentry-action.cpp index 85e9378c8..60332e02e 100644 --- a/src/ink-comboboxentry-action.cpp +++ b/src/ink-comboboxentry-action.cpp @@ -312,7 +312,11 @@ GtkWidget* create_tool_item( GtkAction* action ) GtkWidget* comboBoxEntry = gtk_combo_box_entry_new_with_model( ink_comboboxentry_action->model, 0 ); - gtk_container_add( GTK_CONTAINER(item), comboBoxEntry ); + { + GtkWidget *align = gtk_alignment_new(0, 0.5, 0, 0); + gtk_container_add( GTK_CONTAINER(align), comboBoxEntry ); + gtk_container_add( GTK_CONTAINER(item), align ); + } ink_comboboxentry_action->combobox = GTK_COMBO_BOX_ENTRY(comboBoxEntry); @@ -347,7 +351,7 @@ GtkWidget* create_tool_item( GtkAction* action ) // Add altx_name if required if( ink_comboboxentry_action->altx_name ) { - g_object_set_data( G_OBJECT( child ), ink_comboboxentry_action->altx_name, ink_comboboxentry_action->entry ); + g_object_set_data( G_OBJECT( child ), ink_comboboxentry_action->altx_name, ink_comboboxentry_action->entry ); } // Add signal for GtkEntry to check if finished typing. -- 2.30.2