[gtk+/wip/baedert/children: 6/15] revealer: Measure child widget size using gtk_widget_measure
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/baedert/children: 6/15] revealer: Measure child widget size using gtk_widget_measure
- Date: Sat, 3 Dec 2016 13:46:53 +0000 (UTC)
commit c999a714e23c4e1e9fc62d391882389cc280880a
Author: Timm Bäder <mail baedert org>
Date: Thu Dec 1 19:33:38 2016 +0100
revealer: Measure child widget size using gtk_widget_measure
gtk/gtkrevealer.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtkrevealer.c b/gtk/gtkrevealer.c
index c9e7693..e42be2e 100644
--- a/gtk/gtkrevealer.c
+++ b/gtk/gtkrevealer.c
@@ -316,11 +316,13 @@ gtk_revealer_get_child_allocation (GtkRevealer *revealer,
transition = effective_transition (revealer);
if (transition == GTK_REVEALER_TRANSITION_TYPE_SLIDE_LEFT ||
transition == GTK_REVEALER_TRANSITION_TYPE_SLIDE_RIGHT)
- gtk_widget_get_preferred_width_for_height (child, MAX (0, allocation->height - vertical_padding),
NULL,
- &child_allocation->width);
+ gtk_widget_measure (child, GTK_ORIENTATION_HORIZONTAL,
+ MAX (0, allocation->height - vertical_padding),
+ NULL, &child_allocation->width, NULL, NULL);
else
- gtk_widget_get_preferred_height_for_width (child, MAX (0, allocation->width - horizontal_padding),
NULL,
- &child_allocation->height);
+ gtk_widget_measure (child, GTK_ORIENTATION_VERTICAL,
+ MAX (0, allocation->width - horizontal_padding),
+ NULL, &child_allocation->height, NULL, NULL);
}
child_allocation->width = MAX (child_allocation->width, allocation->width - horizontal_padding);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]