[gtk/wip/baedert/single-node-window: 9/11] window: Don't care about shadow in measure()
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/baedert/single-node-window: 9/11] window: Don't care about shadow in measure()
- Date: Sat, 2 May 2020 16:52:38 +0000 (UTC)
commit 3f101dcfebbaf396cb2de0115001384cc7316d2b
Author: Timm Bäder <mail baedert org>
Date: Sat May 2 08:45:19 2020 +0200
window: Don't care about shadow in measure()
gtk/gtkwindow.c | 17 ++---------------
1 file changed, 2 insertions(+), 15 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 59a1b7c1d3..d283ecd910 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -634,18 +634,9 @@ gtk_window_measure (GtkWidget *widget,
int title_nat_size = 0;
int child_min_size = 0;
int child_nat_size = 0;
- GtkBorder window_border = { 0 };
-
if (priv->decorated && !priv->fullscreen)
{
- get_shadow_width (window, &window_border);
-
- if (orientation == GTK_ORIENTATION_HORIZONTAL)
- for_size -= window_border.left + window_border.right;
- else
- for_size -= window_border.top + window_border.bottom;
-
if (priv->title_box != NULL &&
gtk_widget_get_visible (priv->title_box) &&
gtk_widget_get_child_visible (priv->title_box))
@@ -684,17 +675,13 @@ gtk_window_measure (GtkWidget *widget,
if (orientation == GTK_ORIENTATION_HORIZONTAL)
{
- title_min_size += window_border.left + window_border.right;
- title_nat_size += window_border.left + window_border.right;
- child_min_size += window_border.left + window_border.right;
- child_nat_size += window_border.left + window_border.right;
*minimum = MAX (title_min_size, child_min_size);
*natural = MAX (title_nat_size, child_nat_size);
}
else
{
- *minimum = title_min_size + child_min_size + window_border.top + window_border.bottom;
- *natural = title_nat_size + child_nat_size + window_border.top + window_border.bottom;
+ *minimum = title_min_size + child_min_size;
+ *natural = title_nat_size + child_nat_size;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]