Commit a578e113 authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen
Browse files

Fix #150822, reported by Christian Persch

2004-08-23  Matthias Clasen  <mclasen@redhat.com>

	Fix #150822, reported by Christian Persch

	* gtk/gtklabel.c (gtk_label_ensure_layout): Set the layout width
	appropriately when ellipsized.
	(gtk_label_size_allocate): Only set the layout width if there
	is a layout.
parent 31b68194
2004-08-23 Matthias Clasen <mclasen@redhat.com>
Fix #150822, reported by Christian Persch
* gtk/gtklabel.c (gtk_label_ensure_layout): Set the layout width
appropriately when ellipsized.
(gtk_label_size_allocate): Only set the layout width if there
is a layout.
2004-08-23 Matthias Clasen <mclasen@redhat.com>
* gdk/x11/gdkwindow-x11.c (gdk_window_focus): Support the latest
......
2004-08-23 Matthias Clasen <mclasen@redhat.com>
Fix #150822, reported by Christian Persch
* gtk/gtklabel.c (gtk_label_ensure_layout): Set the layout width
appropriately when ellipsized.
(gtk_label_size_allocate): Only set the layout width if there
is a layout.
2004-08-23 Matthias Clasen <mclasen@redhat.com>
* gdk/x11/gdkwindow-x11.c (gdk_window_focus): Support the latest
......
2004-08-23 Matthias Clasen <mclasen@redhat.com>
Fix #150822, reported by Christian Persch
* gtk/gtklabel.c (gtk_label_ensure_layout): Set the layout width
appropriately when ellipsized.
(gtk_label_size_allocate): Only set the layout width if there
is a layout.
2004-08-23 Matthias Clasen <mclasen@redhat.com>
* gdk/x11/gdkwindow-x11.c (gdk_window_focus): Support the latest
......
2004-08-23 Matthias Clasen <mclasen@redhat.com>
Fix #150822, reported by Christian Persch
* gtk/gtklabel.c (gtk_label_ensure_layout): Set the layout width
appropriately when ellipsized.
(gtk_label_size_allocate): Only set the layout width if there
is a layout.
2004-08-23 Matthias Clasen <mclasen@redhat.com>
* gdk/x11/gdkwindow-x11.c (gdk_window_focus): Support the latest
......
......@@ -1537,7 +1537,10 @@ gtk_label_ensure_layout (GtkLabel *label)
pango_layout_set_alignment (label->layout, align);
pango_layout_set_ellipsize (label->layout, label->ellipsize);
if (label->wrap)
if (label->ellipsize)
pango_layout_set_width (label->layout,
widget->allocation.width * PANGO_SCALE);
else if (label->wrap)
{
GtkWidgetAuxInfo *aux_info;
gint longest_paragraph;
......@@ -1604,7 +1607,7 @@ gtk_label_ensure_layout (GtkLabel *label)
pango_layout_set_width (label->layout, width);
}
}
else /* !label->wrap */
else /* !label->wrap */
pango_layout_set_width (label->layout, -1);
}
}
......@@ -1687,7 +1690,10 @@ gtk_label_size_allocate (GtkWidget *widget,
(* GTK_WIDGET_CLASS (parent_class)->size_allocate) (widget, allocation);
if (label->ellipsize)
pango_layout_set_width (label->layout, allocation->width * PANGO_SCALE);
{
if (label->layout)
pango_layout_set_width (label->layout, allocation->width * PANGO_SCALE);
}
if (label->select_info && label->select_info->window)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment