[gtk+] applicationwindow: Fix issues with measure vfunc transition



commit 75358e4d8dce3790a55649ba867833118c56a64d
Author: Benjamin Otte <otte redhat com>
Date:   Wed Oct 26 17:59:33 2016 +0200

    applicationwindow: Fix issues with measure vfunc transition

 gtk/gtkapplicationwindow.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkapplicationwindow.c b/gtk/gtkapplicationwindow.c
index 5742d91..a01b4ea 100644
--- a/gtk/gtkapplicationwindow.c
+++ b/gtk/gtkapplicationwindow.c
@@ -552,7 +552,7 @@ gtk_application_window_measure (GtkWidget *widget,
           GtkBorder border = {0};
           int menubar_height = 0;
 
-          gtk_widget_get_preferred_height_for_width (priv->menubar, for_size, &menubar_height, NULL);
+          gtk_widget_measure (priv->menubar, orientation, for_size, &menubar_height, NULL, NULL, NULL);
 
           GTK_WIDGET_CLASS (gtk_application_window_parent_class)->measure (widget,
                                                                            orientation,
@@ -561,7 +561,7 @@ gtk_application_window_measure (GtkWidget *widget,
                                                                            minimum_baseline, 
natural_baseline);
 
 
-          gtk_widget_get_preferred_width_for_height (window->priv->menubar, menubar_height, &menubar_min, 
&menubar_nat);
+          gtk_widget_measure (window->priv->menubar, orientation, menubar_height, &menubar_min, 
&menubar_nat, NULL, NULL);
 
           _gtk_window_get_shadow_width (GTK_WINDOW (widget), &border);
           menubar_min += border.left + border.right;
@@ -579,7 +579,7 @@ gtk_application_window_measure (GtkWidget *widget,
                                                                            minimum, natural,
                                                                            minimum_baseline, 
natural_baseline);
 
-          gtk_widget_get_preferred_height_for_width (priv->menubar, for_size, &menubar_min, &menubar_nat);
+          gtk_widget_measure (priv->menubar, orientation, for_size, &menubar_min, &menubar_nat, NULL, NULL);
           *minimum += menubar_min;
           *natural += menubar_nat;
         }


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