[master] Cosmetic change for the Adv. User dialog

David Shea dshea at redhat.com
Tue Aug 12 18:27:39 UTC 2014


On 08/12/2014 11:12 AM, Vratislav Podzimek wrote:
> but due to a bug in Gtk (at least I think) the dialog for some reason grows with
> every two letters in the tip label. Any ideas?

The behavior *kinda* makes sense. If we suppose that the dialog is 
resizable, then the width of this particular label can be shrunk. Since 
the label isn't ellipsizable, using a narrower wrap width would force 
the label to use more height for the text, so gtk is allocating that 
height. Like so:

https://dshea.fedorapeople.org/advuser/original_width.png
and shrunk: https://dshea.fedorapeople.org/advuser/minimum_width.png

But it's easy to fix. We just need to set a minimum width instead of a 
maximum width on the label. Then it comes out like this: 
https://dshea.fedorapeople.org/advuser/swapped_widths.png

All I did was this:

diff --git a/pyanaconda/ui/gui/spokes/advanced_user.glade 
b/pyanaconda/ui/gui/spokes/advanced_user.glade
index 00f49bb..88bf38e 100644
--- a/pyanaconda/ui/gui/spokes/advanced_user.glade
+++ b/pyanaconda/ui/gui/spokes/advanced_user.glade
@@ -356,7 +356,7 @@
                          <property name="label" translatable="yes">You 
may input a comma-separated list of group names and group IDs here.
  Groups that do not already exist will be created; specify their GID in 
parentheses. </property>
                          <property name="wrap">True</property>
-                        <property name="max_width_chars">35</property>
+                        <property name="width_chars">35</property>
                        </object>
                        <packing>
                          <property name="expand">False</property>



More information about the anaconda-patches mailing list