[gtk+] label: Invalidate link colors on style change
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] label: Invalidate link colors on style change
- Date: Wed, 5 Feb 2014 12:40:51 +0000 (UTC)
commit 25d02909c896f8f0eb2089d2f801d72c28ad5560
Author: Benjamin Otte <otte redhat com>
Date: Wed Feb 5 13:36:33 2014 +0100
label: Invalidate link colors on style change
Discovered-by: Timm Bäder <mail baedert org>
https://bugzilla.gnome.org/show_bug.cgi?id=721309
gtk/gtklabel.c | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c
index f0ff935..4d0256f 100644
--- a/gtk/gtklabel.c
+++ b/gtk/gtklabel.c
@@ -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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]