[gtk+/wip/otte/gadget: 8/8] iconhelper: Queue resize on invalidation
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/otte/gadget: 8/8] iconhelper: Queue resize on invalidation
- Date: Mon, 14 Dec 2015 17:56:04 +0000 (UTC)
commit 8173ddca68de02221941f104b83b09dd098c9bfd
Author: Benjamin Otte <otte redhat com>
Date: Mon Dec 14 05:29:35 2015 +0100
iconhelper: Queue resize on invalidation
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.
gtk/gtkiconhelper.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkiconhelper.c b/gtk/gtkiconhelper.c
index deac87c..cd31bc6 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]