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.
This commit is contained in:
parent
3a77da9df2
commit
1f6efbf669
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user