GNOME Bugzilla – Bug 322738
Cell focus drawn incorrectly on ellipsized text cell renderers
Last modified: 2011-01-05 17:26:24 UTC
The cell focus is drawn according to the cell size, and a text cell renderer with ellipsis enabled will return a cell width of 3 characters.
Created attachment 55365 [details] Screenshot of the problem
*** Bug 342301 has been marked as a duplicate of this bug. ***
*** Bug 344370 has been marked as a duplicate of this bug. ***
The get_size() method is really a problem here, since it can never return the actual width used when rendering. The nicest way to fix this is probably adding another method to the GtkCellRenderer interface which would be almost the same as get_size(), but in this case also the background/cell areas are given. This way the cell renderer text can correctly return the width of the layout used. There are more things for which this might be useful: - Determining white areas in the tree view (think rubberbanding/DnD here) - If we are ever going to only draw a selection background under the cell (think Windows explorer), this might be useful too. - IIRC the inplace "tooltips" patch somewhere in bugzilla also adds a method like this.
That makes this 2.12 material then, I guess
Hmmm, is this still a problem? I just saw an ellipsized text renderer and the focus is fine. Maybe this is only a problem with individually-focusable cells?
Yes this is still a problem and indeed only when the text renderer is individually focusable.
This is fixed in master by GtkCellArea (actually gtk_cell_renderer_get_aligned_area() fixes this particularly).