[gtk: 32/88] gtk/expander: Remove manual call to gtk_window_resize()
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk: 32/88] gtk/expander: Remove manual call to gtk_window_resize()
- Date: Tue, 8 Dec 2020 15:38:41 +0000 (UTC)
commit deb58339b955834b5d0c7dbd39e9706c3c22ad8c
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]