[gtk+] widget: Update Pango context on state change
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] widget: Update Pango context on state change
- Date: Mon, 5 Dec 2011 17:29:30 +0000 (UTC)
commit 4259a27cf50a2a09e498e9b6827b60f441449da0
Author: Benjamin Otte <otte redhat com>
Date: Mon Dec 5 18:26:17 2011 +0100
widget: Update Pango context on state change
The layout depends on the state flags, so it must be updated when they
change.
gtk/gtkwidget.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 0babbbb..daa5c29 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -623,6 +623,8 @@ static void gtk_widget_real_get_width_for_height (GtkWidget
gint height,
gint *minimum_width,
gint *natural_width);
+static void gtk_widget_real_state_flags_changed (GtkWidget *widget,
+ GtkStateFlags old_state);
static const GtkWidgetAuxInfo* _gtk_widget_get_aux_info_or_defaults (GtkWidget *widget);
static GtkWidgetAuxInfo* gtk_widget_get_aux_info (GtkWidget *widget,
gboolean create);
@@ -881,6 +883,7 @@ gtk_widget_class_init (GtkWidgetClass *klass)
klass->get_preferred_width_for_height = gtk_widget_real_get_width_for_height;
klass->get_preferred_height_for_width = gtk_widget_real_get_height_for_width;
klass->state_changed = NULL;
+ klass->state_flags_changed = gtk_widget_real_state_flags_changed;
klass->parent_set = NULL;
klass->hierarchy_changed = NULL;
klass->style_set = gtk_widget_real_style_set;
@@ -6517,6 +6520,13 @@ gtk_widget_real_query_tooltip (GtkWidget *widget,
}
static void
+gtk_widget_real_state_flags_changed (GtkWidget *widget,
+ GtkStateFlags old_state)
+{
+ gtk_widget_update_pango_context (widget);
+}
+
+static void
gtk_widget_real_style_updated (GtkWidget *widget)
{
GtkWidgetPrivate *priv = widget->priv;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]