GNOME Bugzilla – Bug 423688
GtkCellRendererCombo: appears-as-list mode is unusable with narrow columns
Last modified: 2018-02-10 03:28:38 UTC
(Forwarded from https://maemo.org/bugzilla/show_bug.cgi?id=1168) Running gtk-demo / Treeview / Editable cells and trying to edit the number cells fails badly when GtkComboBox is in list mode. 1. cat <<EOF >/tmp/gtkrc style "as-list" { GtkComboBox::appears-as-list = 1 } class "GtkComboBox" style "as-list" EOF 2. Add gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (treeview), FALSE); after the 'gtk_tree_view_new_with_model' call in visible_cells.c, and rebuild gtk-demo 3. GTK2_RC_FILES=/tmp/gtkrc gtk-demo 4. Run the Editable cells demo 5. Change the numbers in the first column --> When the number is replaced with the combobox, there isn't enough space to display even the combobox arrow button --> When the combobox is opened, it is roughly 1px wide
Interesting. The combo cell renderer is also unusable when appears-as-list is zero. Maybe the code should be change in such a way that the entry/cellview part of the combo will be displayed on top of the cell, and the arrow next to that (though that arrow would overlap the cell at the right).
Either that or the column width is temporarily increased to fit the combobox naturally. OTOH I think I'd rather have the combobox never displayed, just the popup.
(In reply to comment #1) > Maybe the code should be change in such a way that the entry/cellview part of > the combo will be displayed on top of the cell, and the arrow next to that > (though that arrow would overlap the cell at the right). Which is actually kind of hard, since GtkTreeView handles placing the child widget and does not know what's in there. The other option is to get the combo renderer to reserve space for the array, which doesn't seem like a really bad idea either. (In reply to comment #2) > Either that or the column width is temporarily increased to fit the combobox > naturally. OTOH I think I'd rather have the combobox never displayed, just the > popup. I am not sure if resizing the column is a really good idea -- also GtkTreeView would have to handle this. As for just displaying the popup, I am not so sure how that interaction would work; there is no real indication for the user that the cell can be pressed for a popup.
Target Milestone = 2.12 Freeze? Folks, what is the status here?
Removed 2.12 taret milestore as the current GTK+ version is 2.22
We're moving to gitlab! As part of this move, we are closing bugs that haven't seen activity in more than 5 years. If this issue is still imporant to you and still relevant with GTK+ 3.22 or master, please consider creating a gitlab issue for it.