]> git.sur5r.net Git - glabels/commitdiff
Do not explicitly set sidebar size.
authorJim Evins <evins@snaught.com>
Sat, 12 Jun 2010 01:53:49 +0000 (21:53 -0400)
committerJim Evins <evins@snaught.com>
Sat, 12 Jun 2010 02:48:25 +0000 (22:48 -0400)
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
src/object-editor.c
src/ui-sidebar.c

index 9bd35e530219b0cb3791c268c729aafd5ce92111..395882f9494c11a1e42990c64d4ea334c697f361 100644 (file)
@@ -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>
     <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>
index dfc44fe568bd2824f2bd5dcc9744bf7e33182d41..c792e7c2687eac9f5cbdc93e28a778bec9bc3736 100644 (file)
@@ -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;
index 7042ef92ccc95f157e5482cce86285fc4d72c0c6..60a17755dd214beb89ae36b951f644e2211bf809 100644 (file)
@@ -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");