forked from AuroraMiddleware/gtk
widget: Always warn when underallocating widgets
This commit is contained in:
parent
4c698bc824
commit
84dfda1a2b
@ -6035,17 +6035,14 @@ gtk_widget_size_allocate_with_baseline (GtkWidget *widget,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef G_ENABLE_DEBUG
|
#ifdef G_ENABLE_DEBUG
|
||||||
if (GTK_DEBUG_CHECK (GEOMETRY))
|
if ((min_width > real_allocation.width || min_height > real_allocation.height) &&
|
||||||
{
|
!GTK_IS_SCROLLABLE (widget))
|
||||||
if ((min_width > real_allocation.width || min_height > real_allocation.height) &&
|
g_warning ("gtk_widget_size_allocate(): attempt to underallocate %s%s %s %p. "
|
||||||
!GTK_IS_SCROLLABLE (widget))
|
"Allocation is %dx%d, but minimum required size is %dx%d.",
|
||||||
g_warning ("gtk_widget_size_allocate(): attempt to underallocate %s%s %s %p. "
|
priv->parent ? G_OBJECT_TYPE_NAME (priv->parent) : "", priv->parent ? "'s child" : "toplevel",
|
||||||
"Allocation is %dx%d, but minimum required size is %dx%d.",
|
G_OBJECT_TYPE_NAME (widget), widget,
|
||||||
priv->parent ? G_OBJECT_TYPE_NAME (priv->parent) : "", priv->parent ? "'s child" : "toplevel",
|
real_allocation.width, real_allocation.height,
|
||||||
G_OBJECT_TYPE_NAME (widget), widget,
|
min_width, min_height);
|
||||||
real_allocation.width, real_allocation.height,
|
|
||||||
min_width, min_height);
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
/* Now that we have the right natural height and width, go ahead and remove any margins from the
|
/* Now that we have the right natural height and width, go ahead and remove any margins from the
|
||||||
* allocated sizes and possibly limit them to the natural sizes */
|
* allocated sizes and possibly limit them to the natural sizes */
|
||||||
|
Loading…
Reference in New Issue
Block a user