[gtk/matthiasc/for-master] dropdown: Make the popup as wide as the button
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/matthiasc/for-master] dropdown: Make the popup as wide as the button
- Date: Thu, 11 Jun 2020 22:31:19 +0000 (UTC)
commit 90b78132d4529d483138988d0f7d7b414643d008
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Jun 11 18:29:58 2020 -0400
dropdown: Make the popup as wide as the button
Having narrow popups on a wide button looks awkward.
Do the same as the combo box, and ensure the popup
is at least as wide as the button.
gtk/gtkdropdown.c | 2 ++
1 file changed, 2 insertions(+)
---
diff --git a/gtk/gtkdropdown.c b/gtk/gtkdropdown.c
index 6674a8ba35..c0a37f4089 100644
--- a/gtk/gtkdropdown.c
+++ b/gtk/gtkdropdown.c
@@ -396,6 +396,8 @@ 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_native_check_resize (GTK_NATIVE (self->popup));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]