diff options
author | Benjamin Otte <otte@redhat.com> | 2012-03-21 09:37:09 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2012-04-17 08:59:10 +0200 |
commit | ece9d2fd92b228503bc450dd2778f8d673dbfa18 (patch) | |
tree | b35db4b944d7960cd85251c0563e9cd0a0e89779 /gtk/gtkoverlay.c | |
parent | e7a984b33762a3edd787294b012b4524cb8fd606 (diff) | |
download | gtk+-ece9d2fd92b228503bc450dd2778f8d673dbfa18.tar.gz |
gtk: Make widget only invalidate widget positions
Instead of resetting them completely
Diffstat (limited to 'gtk/gtkoverlay.c')
-rw-r--r-- | gtk/gtkoverlay.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/gtk/gtkoverlay.c b/gtk/gtkoverlay.c index ff046e9852..d22ac88dfd 100644 --- a/gtk/gtkoverlay.c +++ b/gtk/gtkoverlay.c @@ -183,7 +183,6 @@ gtk_overlay_child_update_style_classes (GtkOverlay *overlay, gboolean is_left, is_right, is_top, is_bottom; gboolean has_left, has_right, has_top, has_bottom; GtkStyleContext *context; - gint changed; context = gtk_widget_get_style_context (child); has_left = gtk_style_context_has_class (context, GTK_STYLE_CLASS_LEFT); @@ -192,7 +191,6 @@ gtk_overlay_child_update_style_classes (GtkOverlay *overlay, has_bottom = gtk_style_context_has_class (context, GTK_STYLE_CLASS_BOTTOM); is_left = is_right = is_top = is_bottom = FALSE; - changed = 4; gtk_overlay_get_main_widget_allocation (overlay, &main_allocation); gtk_widget_get_allocation (GTK_WIDGET (overlay), &overlay_allocation); @@ -221,32 +219,21 @@ gtk_overlay_child_update_style_classes (GtkOverlay *overlay, gtk_style_context_remove_class (context, GTK_STYLE_CLASS_LEFT); else if (!has_left && is_left) gtk_style_context_add_class (context, GTK_STYLE_CLASS_LEFT); - else - changed--; if (has_right && !is_right) gtk_style_context_remove_class (context, GTK_STYLE_CLASS_RIGHT); else if (!has_right && is_right) gtk_style_context_add_class (context, GTK_STYLE_CLASS_RIGHT); - else - changed--; if (has_top && !is_top) gtk_style_context_remove_class (context, GTK_STYLE_CLASS_TOP); else if (!has_top && is_top) gtk_style_context_add_class (context, GTK_STYLE_CLASS_TOP); - else - changed--; if (has_bottom && !is_bottom) gtk_style_context_remove_class (context, GTK_STYLE_CLASS_BOTTOM); else if (!has_bottom && is_bottom) gtk_style_context_add_class (context, GTK_STYLE_CLASS_BOTTOM); - else - changed--; - - if (changed > 0) - gtk_widget_reset_style (child); } static void |