[gtk+] viewport: Use a convenience function
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] viewport: Use a convenience function
- Date: Thu, 1 May 2014 13:14:49 +0000 (UTC)
commit b261fc64e263a9ac01686d0e88a00205d1cd2fba
Author: Benjamin Otte <otte redhat com>
Date: Wed Apr 30 08:51:11 2014 +0200
viewport: Use a convenience function
That function looks longer than not using it, but we'll need it in the
next commit.
gtk/gtkviewport.c | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/gtk/gtkviewport.c b/gtk/gtkviewport.c
index 20838af..858b049 100644
--- a/gtk/gtkviewport.c
+++ b/gtk/gtkviewport.c
@@ -29,10 +29,11 @@
#include "gtkadjustment.h"
#include "gtkintl.h"
#include "gtkmarshalers.h"
+#include "gtkpixelcacheprivate.h"
#include "gtkprivate.h"
#include "gtkscrollable.h"
#include "gtktypebuiltins.h"
-#include "gtkpixelcacheprivate.h"
+#include "gtkwidgetprivate.h"
/**
@@ -1050,10 +1051,11 @@ gtk_viewport_get_preferred_size (GtkWidget *widget,
if (child && gtk_widget_get_visible (child))
{
- if (orientation == GTK_ORIENTATION_HORIZONTAL)
- gtk_widget_get_preferred_width (child, &child_min, &child_nat);
- else
- gtk_widget_get_preferred_height (child, &child_min, &child_nat);
+ _gtk_widget_get_preferred_size_for_size (child,
+ orientation,
+ -1,
+ &child_min, &child_nat,
+ NULL, NULL);
minimum += child_min;
natural += child_nat;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]