diff options
author | Matthias Clasen <mclasen@redhat.com> | 2020-12-08 15:38:36 +0000 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2020-12-08 15:38:36 +0000 |
commit | 1f141c19533f4b3f397c3959ade673ce243b6138 (patch) | |
tree | a789e257dfd8d6aed9ac0f6e7c6ba44ed2be3ec5 /gtk/gtkexpander.c | |
parent | 1e14a91cb9307e039c7e2b5affb247f0f052272d (diff) | |
parent | 074b933ae4e866d092edd734fd43524e39033b5e (diff) | |
download | gtk+-1f141c19533f4b3f397c3959ade673ce243b6138.tar.gz |
Merge branch 'wip/surface-state-rework' into 'master'
Rework surface state and geometry computation
See merge request GNOME/gtk!2885
Diffstat (limited to 'gtk/gtkexpander.c')
-rw-r--r-- | gtk/gtkexpander.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/gtk/gtkexpander.c b/gtk/gtkexpander.c index 647ee68428..bbe08fcced 100644 --- a/gtk/gtkexpander.c +++ b/gtk/gtkexpander.c @@ -727,23 +727,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)); } } |