mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-04 01:31:13 +00:00
label: Don't create the layout in size_allocate() if not needed
Just update its size if it already exists.
This commit is contained in:
parent
c94dca36ca
commit
9992efdb0e
@ -3803,13 +3803,8 @@ gtk_label_size_allocate (GtkWidget *widget,
|
||||
|
||||
GTK_WIDGET_CLASS (gtk_label_parent_class)->size_allocate (widget, allocation);
|
||||
|
||||
/* The layout may have been recently cleared in get_size_for_orientation(),
|
||||
* but the width at that point may not be the same as the allocated width
|
||||
*/
|
||||
if (priv->wrap)
|
||||
gtk_label_clear_layout (label);
|
||||
|
||||
gtk_label_ensure_layout (label);
|
||||
if (priv->layout)
|
||||
gtk_label_update_layout_width (label);
|
||||
|
||||
if (priv->select_info && priv->select_info->window)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user