[gtk/matthiasc/surface-state-rework: 32/80] gtk/expander: Remove manual call to gtk_window_resize()
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/matthiasc/surface-state-rework: 32/80] gtk/expander: Remove manual call to gtk_window_resize()
- Date: Sat, 5 Dec 2020 17:42:39 +0000 (UTC)
commit de208b96f0f2a84c185860e712faf047c6223952
Author: Jonas Ã…dahl <jadahl gmail com>
Date: Wed Dec 2 09:56:55 2020 +0100
gtk/expander: Remove manual call to gtk_window_resize()
It happens implicitly for a non-resizeable window.
gtk/gtkexpander.c | 18 +-----------------
1 file changed, 1 insertion(+), 17 deletions(-)
---
diff --git a/gtk/gtkexpander.c b/gtk/gtkexpander.c
index 9b60db04a4..443f4f48c5 100644
--- a/gtk/gtkexpander.c
+++ b/gtk/gtkexpander.c
@@ -725,23 +725,7 @@ gtk_expander_resize_toplevel (GtkExpander *expander)
if (GTK_IS_WINDOW (toplevel) &&
gtk_widget_get_realized (toplevel))
- {
- int toplevel_width, toplevel_height;
- int child_height;
-
- gtk_widget_measure (child, GTK_ORIENTATION_VERTICAL, -1,
- &child_height, NULL, NULL, NULL);
- gtk_window_get_size (GTK_WINDOW (toplevel), &toplevel_width, &toplevel_height);
-
- if (expander->expanded)
- toplevel_height += child_height;
- else
- toplevel_height -= child_height;
-
- gtk_window_resize (GTK_WINDOW (toplevel),
- toplevel_width,
- toplevel_height);
- }
+ gtk_widget_queue_resize (GTK_WIDGET (expander));
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]