mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-06 00:30:08 +00:00
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:
parent
ea8167d919
commit
8f526a5dc9
@ -1,5 +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)
|
||||
|
||||
* gdk/gdkregion-generic.c (miRegionCopy): Fix this for the
|
||||
single-rectangle case. (#326127, Benjamin Berg)
|
||||
(gdk_region_copy): Use miRegionCopy() here.
|
||||
|
@ -1,5 +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)
|
||||
|
||||
* gdk/gdkregion-generic.c (miRegionCopy): Fix this for the
|
||||
single-rectangle case. (#326127, Benjamin Berg)
|
||||
(gdk_region_copy): Use miRegionCopy() here.
|
||||
|
@ -2191,19 +2191,21 @@ get_layout_location (GtkLabel *label,
|
||||
gint *yp)
|
||||
{
|
||||
GtkMisc *misc;
|
||||
GtkWidget *widget;
|
||||
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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user