[virt-tools-list] [virt-manager PATCH 1/2] Resolve incorrect label alignment

Radostin Stoyanov rstoyanov1 at gmail.com
Thu Jun 1 05:40:21 UTC 2017


The "xalign" property determines the horizontal alignment of the label
text inside the labels size allocation. Compare this to “halign”,
which determines how the labels size allocation is positioned
in the space available for the label. [1]

When the "width_chars" property is used, labels appear to be centered.
This could be resolved when the property "width_chars" is replaced
with "max_width_chars" or removed in case "max_width_chars" is already
set. [2]

[1] https://developer.gnome.org/gtk3/stable/GtkLabel.html#GtkLabel--xalign
[2] https://developer.gnome.org/gtk3/stable/GtkWidget.html#GtkAlign
---
 ui/asyncjob.ui | 1 -
 ui/clone.ui    | 3 +--
 ui/create.ui   | 2 --
 3 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/ui/asyncjob.ui b/ui/asyncjob.ui
index 0404b3b..b1fb811 100644
--- a/ui/asyncjob.ui
+++ b/ui/asyncjob.ui
@@ -51,7 +51,6 @@
                 <property name="valign">start</property>
                 <property name="label" translatable="yes">Please wait a few moments...</property>
                 <property name="wrap">True</property>
-                <property name="width_chars">50</property>
                 <property name="max_width_chars">50</property>
               </object>
               <packing>
diff --git a/ui/clone.ui b/ui/clone.ui
index c7e6a78..5607d8a 100644
--- a/ui/clone.ui
+++ b/ui/clone.ui
@@ -666,7 +666,7 @@ like change passwords or static IPs, please see the virt-sysprep(1) tool.</sp
                                 <property name="can_focus">False</property>
                                 <property name="halign">start</property>
                                 <property name="label">orig-mac</property>
-                                <property name="width_chars">20</property>
+                                <property name="max_width_chars">20</property>
                               </object>
                             </child>
                           </object>
@@ -909,7 +909,6 @@ like change passwords or static IPs, please see the virt-sysprep(1) tool.</sp
                         <property name="halign">start</property>
                         <property name="label">orig-path</property>
                         <property name="ellipsize">start</property>
-                        <property name="width_chars">25</property>
                         <property name="max_width_chars">25</property>
                       </object>
                       <packing>
diff --git a/ui/create.ui b/ui/create.ui
index d457abd..ded90a7 100644
--- a/ui/create.ui
+++ b/ui/create.ui
@@ -477,7 +477,6 @@
                                     <property name="halign">start</property>
                                     <property name="label">conn label</property>
                                     <property name="ellipsize">end</property>
-                                    <property name="width_chars">25</property>
                                     <property name="max_width_chars">25</property>
                                   </object>
                                   <packing>
@@ -2513,7 +2512,6 @@ is not yet supported.</small></property>
                                             <property name="halign">start</property>
                                             <property name="label">label</property>
                                             <property name="ellipsize">start</property>
-                                            <property name="width_chars">27</property>
                                             <property name="max_width_chars">27</property>
                                           </object>
                                           <packing>
-- 
2.9.4




More information about the virt-tools-list mailing list