forked from AuroraMiddleware/gtk
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.
This commit is contained in:
parent
31b681948c
commit
a578e11346
@ -1,3 +1,12 @@
|
||||
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
|
||||
|
@ -1,3 +1,12 @@
|
||||
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
|
||||
|
@ -1,3 +1,12 @@
|
||||
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
|
||||
|
@ -1,3 +1,12 @@
|
||||
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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user