summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2020-07-24 09:07:45 -0400
committerMatthias Clasen <mclasen@redhat.com>2020-07-24 14:15:04 -0400
commitc85e424279c2fdcb712675bb1d905d9daaf1ebf2 (patch)
treee89e80700bb9717da42669c5f099c1bc91552cab
parent3176d690091ec60d2df2eee4578c74d8d08e41b6 (diff)
downloadgtk+-c85e424279c2fdcb712675bb1d905d9daaf1ebf2.tar.gz
dropdown: Fix popup sizing
Setting a width request is not quite enough, since gtk_widget_set_size_request() only queues a resize when the widget is visible. Explicitly force one here. Without this, the popup sometimes shows up too small.
-rw-r--r--gtk/gtkdropdown.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gtk/gtkdropdown.c b/gtk/gtkdropdown.c
index a7c48d5d87..7b169ba780 100644
--- a/gtk/gtkdropdown.c
+++ b/gtk/gtkdropdown.c
@@ -379,6 +379,7 @@ gtk_drop_down_size_allocate (GtkWidget *widget,
gtk_widget_size_allocate (self->button, &(GtkAllocation) { 0, 0, width, height }, baseline);
gtk_widget_set_size_request (self->popup, width, -1);
+ gtk_widget_queue_resize (self->popup);
gtk_native_check_resize (GTK_NATIVE (self->popup));
}