forked from AuroraMiddleware/gtk
widget: Add a function that does actual resize
It's just shuffling code around.
This commit is contained in:
parent
58d506fb11
commit
3ff894c201
@ -26,7 +26,6 @@
|
||||
#include "gtktypebuiltins.h"
|
||||
#include "gtkprivate.h"
|
||||
#include "gtksizegroup-private.h"
|
||||
#include "gtksizerequestcacheprivate.h"
|
||||
#include "gtkwidgetprivate.h"
|
||||
#include "gtkcontainerprivate.h"
|
||||
|
||||
@ -218,8 +217,7 @@ queue_resize_on_widget (GtkWidget *widget,
|
||||
|
||||
do
|
||||
{
|
||||
_gtk_widget_set_alloc_needed (parent, TRUE);
|
||||
_gtk_size_request_cache_clear (_gtk_widget_peek_request_cache (parent));
|
||||
gtk_widget_queue_resize_on_widget (parent);
|
||||
|
||||
if (!check_siblings || _gtk_widget_get_sizegroups (parent) == NULL)
|
||||
{
|
||||
|
@ -16157,10 +16157,12 @@ _gtk_widget_get_alloc_needed (GtkWidget *widget)
|
||||
}
|
||||
|
||||
void
|
||||
_gtk_widget_set_alloc_needed (GtkWidget *widget,
|
||||
gboolean alloc_needed)
|
||||
gtk_widget_queue_resize_on_widget (GtkWidget *widget)
|
||||
{
|
||||
widget->priv->alloc_needed = alloc_needed;
|
||||
GtkWidgetPrivate *priv = widget->priv;
|
||||
|
||||
priv->alloc_needed = TRUE;
|
||||
_gtk_size_request_cache_clear (&priv->requests);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -72,6 +72,7 @@ struct _GtkWidgetPrivate
|
||||
guint in_reparent : 1;
|
||||
|
||||
/* Queue-resize related flags */
|
||||
guint resize_needed : 1; /* queue_resize() has been called but no get_preferred_size() yet */
|
||||
guint alloc_needed : 1;
|
||||
|
||||
/* Expand-related flags */
|
||||
@ -165,8 +166,7 @@ gboolean _gtk_widget_get_shadowed (GtkWidget *widget);
|
||||
void _gtk_widget_set_shadowed (GtkWidget *widget,
|
||||
gboolean shadowed);
|
||||
gboolean _gtk_widget_get_alloc_needed (GtkWidget *widget);
|
||||
void _gtk_widget_set_alloc_needed (GtkWidget *widget,
|
||||
gboolean alloc_needed);
|
||||
void gtk_widget_queue_resize_on_widget (GtkWidget *widget);
|
||||
void _gtk_widget_draw (GtkWidget *widget,
|
||||
cairo_t *cr);
|
||||
void _gtk_widget_scale_changed (GtkWidget *widget);
|
||||
|
Loading…
Reference in New Issue
Block a user