Resolve incorrect label alignment

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
This commit is contained in:
Radostin Stoyanov 2017-06-01 06:40:21 +01:00 committed by Cole Robinson
parent 4f8e795c6a
commit fc5ecbcdf8
4 changed files with 1 additions and 6 deletions

View File

@ -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>

View File

@ -666,7 +666,7 @@ like change passwords or static IPs, please see the virt-sysprep(1) tool.&lt;/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.&lt;/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>

View File

@ -150,7 +150,6 @@
<property name="halign">start</property>
<property name="label">uri</property>
<property name="ellipsize">end</property>
<property name="width_chars">22</property>
<property name="max_width_chars">22</property>
</object>
<packing>

View File

@ -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.&lt;/small&gt;</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>