[gtk+/wip/baedert/gtkimageview: 167/186] widget: Always warn when underallocating widgets



commit 84a3aa76a97bf964a18889ca63aa85f93a411af0
Author: Timm Bäder <mail baedert org>
Date:   Tue Feb 23 10:34:16 2016 +0100

    widget: Always warn when underallocating widgets

 gtk/gtkwidget.c |   19 ++++++++-----------
 1 files changed, 8 insertions(+), 11 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index b7346e1..76238e3 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -6032,17 +6032,14 @@ gtk_widget_size_allocate_with_baseline (GtkWidget     *widget,
     }
 
 #ifdef G_ENABLE_DEBUG
-  if (GTK_DEBUG_CHECK (GEOMETRY))
-    {
-      if ((min_width > real_allocation.width || min_height > real_allocation.height) &&
-          !GTK_IS_SCROLLABLE (widget))
-        g_warning ("gtk_widget_size_allocate(): attempt to underallocate %s%s %s %p. "
-                   "Allocation is %dx%d, but minimum required size is %dx%d.",
-                   priv->parent ? G_OBJECT_TYPE_NAME (priv->parent) : "", priv->parent ? "'s child" : 
"toplevel",
-                   G_OBJECT_TYPE_NAME (widget), widget,
-                   real_allocation.width, real_allocation.height,
-                   min_width, min_height);
-    }
+  if ((min_width > real_allocation.width || min_height > real_allocation.height) &&
+      !GTK_IS_SCROLLABLE (widget))
+    g_warning ("gtk_widget_size_allocate(): attempt to underallocate %s%s %s %p. "
+               "Allocation is %dx%d, but minimum required size is %dx%d.",
+               priv->parent ? G_OBJECT_TYPE_NAME (priv->parent) : "", priv->parent ? "'s child" : "toplevel",
+               G_OBJECT_TYPE_NAME (widget), widget,
+               real_allocation.width, real_allocation.height,
+               min_width, min_height);
 #endif
   /* 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 */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]