summaryrefslogtreecommitdiff
path: root/gtk/gtksizerequest.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2013-04-27 23:16:11 +0200
committerBenjamin Otte <otte@redhat.com>2013-05-01 16:41:11 +0200
commit1349292e4744db7914cb98c407ccd3004eb50c5b (patch)
tree0a15850ec45ae75f2db164426b44e7d78c75d9b6 /gtk/gtksizerequest.c
parent8f0659071278ae8222f154bd03d4690b275b6ff1 (diff)
downloadgtk+-1349292e4744db7914cb98c407ccd3004eb50c5b.tar.gz
widget: Adapt _gtk_widget_get_preferred_size_for_size()
... for baseline support byu taking two extra (possible NULL) arguments.
Diffstat (limited to 'gtk/gtksizerequest.c')
-rw-r--r--gtk/gtksizerequest.c31
1 files changed, 22 insertions, 9 deletions
diff --git a/gtk/gtksizerequest.c b/gtk/gtksizerequest.c
index 26a7efc769..ed30f9515d 100644
--- a/gtk/gtksizerequest.c
+++ b/gtk/gtksizerequest.c
@@ -858,20 +858,33 @@ _gtk_widget_get_preferred_size_for_size (GtkWidget *widget,
GtkOrientation orientation,
gint size,
gint *minimum,
- gint *natural)
+ gint *natural,
+ gint *minimum_baseline,
+ gint *natural_baseline)
{
g_return_if_fail (GTK_IS_WIDGET (widget));
g_return_if_fail (size >= -1);
if (orientation == GTK_ORIENTATION_HORIZONTAL)
- if (size < 0)
- gtk_widget_get_preferred_width (widget, minimum, natural);
- else
- gtk_widget_get_preferred_width_for_height (widget, size, minimum, natural);
+ {
+ if (size < 0)
+ gtk_widget_get_preferred_width (widget, minimum, natural);
+ else
+ gtk_widget_get_preferred_width_for_height (widget, size, minimum, natural);
+
+ if (minimum_baseline)
+ *minimum_baseline = -1;
+ if (natural_baseline)
+ *natural_baseline = -1;
+ }
else
- if (size < 0)
- gtk_widget_get_preferred_height (widget, minimum, natural);
- else
- gtk_widget_get_preferred_height_for_width (widget, size, minimum, natural);
+ {
+ gtk_widget_get_preferred_height_and_baseline_for_width (widget,
+ size,
+ minimum,
+ natural,
+ minimum_baseline,
+ natural_baseline);
+ }
}