summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2015-12-14 05:29:35 +0100
committerBenjamin Otte <otte@redhat.com>2015-12-15 01:16:25 +0100
commite8e3ed164416cd100e95b76204b4e49ab1c4fcca (patch)
tree93b860b0a123e91652bde76e773b6f405a7a413f
parent80f7a2a0f2bf32f66b3f1348081d9b8d36e5b215 (diff)
downloadgtk+-wip/otte/gadget.tar.gz
iconhelper: Queue resize on invalidationwip/otte/gadget
When things change in the iconhelper, queue a resize on the owner widget so that it automatically resizes. Only do this for iconhelpers that are used as gadgets though, not for temporary helpers - and to check this, check if the node is transient.
-rw-r--r--gtk/gtkiconhelper.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gtk/gtkiconhelper.c b/gtk/gtkiconhelper.c
index deac87c661..cd31bc62a8 100644
--- a/gtk/gtkiconhelper.c
+++ b/gtk/gtkiconhelper.c
@@ -28,6 +28,7 @@
#include "gtkcssnodeprivate.h"
#include "gtkcssstyleprivate.h"
#include "gtkcssstylepropertyprivate.h"
+#include "gtkcsstransientnodeprivate.h"
#include "gtkiconthemeprivate.h"
#include "gtkrendericonprivate.h"
#include "deprecated/gtkiconfactoryprivate.h"
@@ -55,6 +56,9 @@ gtk_icon_helper_invalidate (GtkIconHelper *self)
cairo_surface_destroy (self->priv->rendered_surface);
self->priv->rendered_surface = NULL;
}
+
+ if (!GTK_IS_CSS_TRANSIENT_NODE (gtk_css_gadget_get_node (GTK_CSS_GADGET (self))))
+ gtk_widget_queue_resize (gtk_css_gadget_get_owner (GTK_CSS_GADGET (self)));
}
static void