[glabels] Do not explicitly set sidebar size.



commit fe7a2fbf407047c5d69ccc93e9d5a6cb92d08871
Author: Jim Evins <evins snaught com>
Date:   Fri Jun 11 21:53:49 2010 -0400

    Do not explicitly set sidebar size.
    
    Use 2 sizegroups to automatically fix sidebar size based on the size
    of the widgets it contains -- even hidden ones.  The width was previously
    set explicitly to prevent the sidebar from changing size whenever objects
    are selected and unselected.  This has been problematic for compatability
    with different themes, fonts, and translations.

 data/ui/object-editor.ui |   21 ++++++++++++++++++++-
 src/object-editor.c      |    2 +-
 src/ui-sidebar.c         |    2 --
 3 files changed, 21 insertions(+), 4 deletions(-)
---
diff --git a/data/ui/object-editor.ui b/data/ui/object-editor.ui
index 9bd35e5..395882f 100644
--- a/data/ui/object-editor.ui
+++ b/data/ui/object-editor.ui
@@ -54,7 +54,6 @@
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="scrollable">True</property>
-                <property name="homogeneous">True</property>
                 <child>
                   <object class="GtkVBox" id="edit_page_vbox">
                     <property name="visible">True</property>
@@ -2238,4 +2237,24 @@
     <property name="step_increment">1</property>
     <property name="page_increment">10</property>
   </object>
+  <object class="GtkSizeGroup" id="page_sizegroup">
+    <property name="mode">both</property>
+    <widgets>
+      <widget name="edit_page_vbox"/>
+      <widget name="text_page_vbox"/>
+      <widget name="line_page_vbox"/>
+      <widget name="fill_page_vbox"/>
+      <widget name="img_page_vbox"/>
+      <widget name="data_page_vbox"/>
+      <widget name="size_page_vbox"/>
+      <widget name="lsize_page_vbox"/>
+      <widget name="shadow_page_vbox"/>
+    </widgets>
+  </object>
+  <object class="GtkSizeGroup" id="width_sizegroup">
+    <widgets>
+      <widget name="notebook"/>
+      <widget name="title_hbox"/>
+    </widgets>
+  </object>
 </interface>
diff --git a/src/object-editor.c b/src/object-editor.c
index dfc44fe..c792e7c 100644
--- a/src/object-editor.c
+++ b/src/object-editor.c
@@ -118,7 +118,7 @@ gl_object_editor_init (glObjectEditor *editor)
                                        "adjustment4",  "adjustment5",  "adjustment6",
                                        "adjustment7",  "adjustment8",  "adjustment9",
                                        "adjustment10", "adjustment11", "adjustment12",
-                                       "adjustment13",
+                                       "adjustment13", "page_sizegroup", "width_sizegroup",
                                        NULL };
         GError       *error = NULL;
         gchar        *s;
diff --git a/src/ui-sidebar.c b/src/ui-sidebar.c
index 7042ef9..60a1775 100644
--- a/src/ui-sidebar.c
+++ b/src/ui-sidebar.c
@@ -123,8 +123,6 @@ gl_ui_sidebar_new (void)
 
 	sidebar = g_object_new (gl_ui_sidebar_get_type (), NULL);
 
-	gtk_widget_set_size_request (GTK_WIDGET (sidebar), DEFAULT_SIDEBAR_WIDTH, -1);
-
 	gl_ui_sidebar_construct (sidebar);
 
 	gl_debug (DEBUG_UI, "END");



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