GNOME Bugzilla – Bug 301193
ComboBoxEntry dropdown is useless when empty
Last modified: 2018-05-02 14:08:36 UTC
It would be nice if the GtkComboBoxEntry did not show the drop-down menu arrow when there are no items for it to show. This would allow me to use a GtkComboBoxEntry for data that may, or may not, have a list of possible values, without sometimes changing the widget temporarily to a GtkEntry.
Created attachment 182212 [details] [review] Patch to add "always-show-arrow" property to the combo box This patch adds a property to allow the user to create combo boxes who's dropdown indicator disappears when there is no model or the model is empty. By default (for backwards compatibility), the "always-show-arrow" property is TRUE. Furthermore, this patch still enforces that the height of the combo-box be at least the height required to fit the dropdown indicator (this is to avoid awkward resizing of the combobox while it toggles it's empty state). The patch includes an elaboration to tests/testcombochange.c, fire up the test to see the new behavior of combo boxes while adding/removing data (it includes a new control to disable "always-show-arrow").
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gtk/issues/246.