Fix label alignment when width-chars is set. (#326098, Benjamin Otte)
2006-01-08 Matthias Clasen <mclasen@redhat.com> * gtk/gtklabel.c (get_layout_location): Fix label alignment when width-chars is set. (#326098, Benjamin Otte)
This commit is contained in:
committed by
Matthias Clasen
parent
a9be5ddf14
commit
42edcf8a77
@@ -1,3 +1,8 @@
|
||||
2006-01-08 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtklabel.c (get_layout_location): Fix label alignment
|
||||
when width-chars is set. (#326098, Benjamin Otte)
|
||||
|
||||
2006-01-06 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkactiongroup.c (gtk_action_group_set_sensitive)
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
2006-01-08 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtklabel.c (get_layout_location): Fix label alignment
|
||||
when width-chars is set. (#326098, Benjamin Otte)
|
||||
|
||||
2006-01-06 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkactiongroup.c (gtk_action_group_set_sensitive)
|
||||
|
||||
@@ -2155,18 +2155,20 @@ get_layout_location (GtkLabel *label,
|
||||
{
|
||||
GtkMisc *misc;
|
||||
GtkWidget *widget;
|
||||
GtkLabelPrivate *priv;
|
||||
gfloat xalign;
|
||||
gint req_width, x, y;
|
||||
|
||||
misc = GTK_MISC (label);
|
||||
widget = GTK_WIDGET (label);
|
||||
priv = GTK_LABEL_GET_PRIVATE (label);
|
||||
|
||||
if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_LTR)
|
||||
xalign = misc->xalign;
|
||||
else
|
||||
xalign = 1.0 - misc->xalign;
|
||||
|
||||
if (label->ellipsize)
|
||||
if (label->ellipsize || priv->width_chars > 0)
|
||||
{
|
||||
PangoRectangle ink_rect;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user