mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-11 11:20:12 +00:00
GtkLabel: make patterns work a little better
When a pattern has been set, we must not throw away the attributes that contain it. https://bugzilla.gnome.org/show_bug.cgi?id=658111
This commit is contained in:
parent
80fbbc38e3
commit
dc898e3f84
@ -250,7 +250,7 @@ struct _GtkLabelPrivate
|
||||
|
||||
gdouble angle;
|
||||
|
||||
guint mnemonics_visible : 1;
|
||||
guint mnemonics_visible : 1;
|
||||
guint jtype : 2;
|
||||
guint wrap : 1;
|
||||
guint use_underline : 1;
|
||||
@ -2098,17 +2098,17 @@ gtk_label_recalculate (GtkLabel *label)
|
||||
|
||||
if (priv->use_markup)
|
||||
gtk_label_set_markup_internal (label, priv->label, priv->use_underline);
|
||||
else if (priv->use_underline)
|
||||
gtk_label_set_uline_text_internal (label, priv->label);
|
||||
else
|
||||
{
|
||||
if (priv->use_underline)
|
||||
gtk_label_set_uline_text_internal (label, priv->label);
|
||||
else
|
||||
if (!priv->pattern_set)
|
||||
{
|
||||
if (priv->effective_attrs)
|
||||
pango_attr_list_unref (priv->effective_attrs);
|
||||
priv->effective_attrs = NULL;
|
||||
gtk_label_set_text_internal (label, g_strdup (priv->label));
|
||||
}
|
||||
gtk_label_set_text_internal (label, g_strdup (priv->label));
|
||||
}
|
||||
|
||||
gtk_label_compose_effective_attrs (label);
|
||||
|
Loading…
Reference in New Issue
Block a user