[gtk/wip/baedert/for-master: 20/23] widget: Move adjusted size calculation below early-out goto
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/baedert/for-master: 20/23] widget: Move adjusted size calculation below early-out goto
- Date: Wed, 13 May 2020 06:08:56 +0000 (UTC)
commit 167c6119eb65aea6374b6ea5d5df7346040b0c9e
Author: Timm Bäder <mail baedert org>
Date: Sun May 10 16:55:03 2020 +0200
widget: Move adjusted size calculation below early-out goto
gtk/gtkwidget.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 479d9b6669..ed6c3fc091 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -3951,12 +3951,6 @@ gtk_widget_allocate (GtkWidget *widget,
adjusted.x += border.left + padding.left;
adjusted.y += border.top + padding.top;
- /* Since gtk_widget_measure does it for us, we can be sure here that
- * the given alloaction is large enough for the css margin/bordder/padding */
- adjusted.width -= border.left + padding.left +
- border.right + padding.right;
- adjusted.height -= border.top + padding.top +
- border.bottom + padding.bottom;
if (baseline >= 0)
baseline -= margin.top + border.top + padding.top;
if (adjusted.x || adjusted.y)
@@ -3971,6 +3965,13 @@ gtk_widget_allocate (GtkWidget *widget,
if (!alloc_needed && !size_changed && !baseline_changed)
goto skip_allocate;
+ /* Since gtk_widget_measure does it for us, we can be sure here that
+ * the given alloaction is large enough for the css margin/bordder/padding */
+ adjusted.width -= border.left + padding.left +
+ border.right + padding.right;
+ adjusted.height -= border.top + padding.top +
+ border.bottom + padding.bottom;
+
priv->width = adjusted.width;
priv->height = adjusted.height;
priv->baseline = baseline;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]