Commit 25d02909 authored by Benjamin Otte's avatar Benjamin Otte

label: Invalidate link colors on style change

Discovered-by: Timm Bäder's avatarTimm Bäder <mail@baedert.org>

https://bugzilla.gnome.org/show_bug.cgi?id=721309
parent 219357d6
......@@ -362,6 +362,7 @@ static void gtk_label_size_allocate (GtkWidget *widget,
GtkAllocation *allocation);
static void gtk_label_state_flags_changed (GtkWidget *widget,
GtkStateFlags prev_state);
static void gtk_label_style_updated (GtkWidget *widget);
static gboolean gtk_label_draw (GtkWidget *widget,
cairo_t *cr);
static gboolean gtk_label_focus (GtkWidget *widget,
......@@ -545,6 +546,7 @@ gtk_label_class_init (GtkLabelClass *class)
widget_class->destroy = gtk_label_destroy;
widget_class->size_allocate = gtk_label_size_allocate;
widget_class->state_flags_changed = gtk_label_state_flags_changed;
widget_class->style_updated = gtk_label_style_updated;
widget_class->query_tooltip = gtk_label_query_tooltip;
widget_class->draw = gtk_label_draw;
widget_class->realize = gtk_label_realize;
......@@ -3880,6 +3882,18 @@ gtk_label_state_flags_changed (GtkWidget *widget,
GTK_WIDGET_CLASS (gtk_label_parent_class)->state_flags_changed (widget, prev_state);
}
static void
gtk_label_style_updated (GtkWidget *widget)
{
GtkLabel *label = GTK_LABEL (widget);
GtkLabelPrivate *priv = label->priv;
GTK_WIDGET_CLASS (gtk_label_parent_class)->style_updated (widget);
if (priv->select_info && priv->select_info->links)
gtk_label_update_layout_attributes (label);
}
static void
get_layout_location (GtkLabel *label,
gint *xp,
......
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