After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 423688 - GtkCellRendererCombo: appears-as-list mode is unusable with narrow columns
GtkCellRendererCombo: appears-as-list mode is unusable with narrow columns
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: Widget: GtkTreeView
2.10.x
Other Linux
: Normal normal
: ---
Assigned To: gtktreeview-bugs
gtktreeview-bugs
Depends on:
Blocks:
 
 
Reported: 2007-03-28 11:51 UTC by Tommi Komulainen
Modified: 2018-02-10 03:28 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Tommi Komulainen 2007-03-28 11:51:21 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
Comment 1 Kristian Rietveld 2007-03-28 15:09:28 UTC
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).
Comment 2 Tommi Komulainen 2007-03-28 15:31:38 UTC
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.
Comment 3 Kristian Rietveld 2007-03-28 15:41:43 UTC
(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.
Comment 4 André Klapper 2008-09-08 13:55:35 UTC
Target Milestone = 2.12 Freeze?
Folks, what is the status here?
Comment 5 André Klapper 2008-11-21 15:24:20 UTC
Target Milestone = 2.12 Freeze?
Folks, what is the status here?
Comment 6 Javier Jardón (IRC: jjardon) 2010-10-29 17:19:47 UTC
Removed 2.12 taret milestore as the current GTK+ version is 2.22
Comment 7 Matthias Clasen 2018-02-10 03:28:38 UTC
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.