[gtk+/wip/baedert/drawing: 141/188] window: Stop using gtk_widget_get_preferred*
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/baedert/drawing: 141/188] window: Stop using gtk_widget_get_preferred*
- Date: Thu, 4 May 2017 07:47:45 +0000 (UTC)
commit 217c97c59a9dec783da021ab6a86a498edbd078a
Author: Timm Bäder <mail baedert org>
Date: Wed May 3 16:37:55 2017 +0200
window: Stop using gtk_widget_get_preferred*
gtk/gtkwindow.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index e7f1680..6efc3cc 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -8927,7 +8927,7 @@ gtk_window_move_resize (GtkWindow *window)
if (priv->configure_notify_received)
{
GtkAllocation allocation;
- int min, nat;
+ int min;
/* If we have received a configure event since
* the last time in this function, we need to
@@ -8946,9 +8946,11 @@ gtk_window_move_resize (GtkWindow *window)
allocation.y = 0;
/*allocation.width = current_width;*/
- gtk_widget_get_preferred_width (widget, &min, &nat);
+ gtk_widget_measure (widget, GTK_ORIENTATION_HORIZONTAL, -1,
+ &min, NULL, NULL, NULL);
allocation.width = MAX (min, current_width);
- gtk_widget_get_preferred_height_for_width (widget, allocation.width, &min, &nat);
+ gtk_widget_measure (widget, GTK_ORIENTATION_VERTICAL, allocation.width,
+ &min, NULL, NULL, NULL);
allocation.height = MAX (min, current_height);
gtk_widget_size_allocate (widget, &allocation);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]