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 340206 - [patch] Little patch for GtkTreeView to draw a focus on current row. (with patch files)
[patch] Little patch for GtkTreeView to draw a focus on current row. (with pa...
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: Widget: GtkTreeView
2.8.x
Other All
: Normal enhancement
: ---
Assigned To: gtktreeview-bugs
gtktreeview-bugs
Depends on:
Blocks: 613728
 
 
Reported: 2006-04-30 15:58 UTC by Hong Jen Yee
Modified: 2018-02-10 04:39 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
Patch for GtkTreeView (726 bytes, patch)
2006-04-30 15:59 UTC, Hong Jen Yee
none Details | Review
A new patch adding a style property called "full-row-focus" instead of changing things unconditionally. (1.53 KB, patch)
2006-06-03 09:07 UTC, Hong Jen Yee
none Details | Review

Description Hong Jen Yee 2006-04-30 15:58:27 UTC
Under Windows, rows of list view/tree view which have cursors on 
them (most often selected) always have focus drawn if the view 
widgets have input focus.
This patch draw a focus rectangle on the row with cursor. (Windows only)
Comment 1 Hong Jen Yee 2006-04-30 15:59:03 UTC
Created attachment 64576 [details] [review]
Patch for GtkTreeView
Comment 2 Tor Lillqvist 2006-05-02 08:10:00 UTC
I don't think it's a good idea to unconditionally change the appearance on Windows like that. This should be something that happens only if the ms-windows theme is used, shouldn't it? And the ifdef should check GDK_WINDOWING_WIN32, not G_OS_WIN32 (yeah, in practise those are equivalent, at least currently).
Comment 3 Hong Jen Yee 2006-05-02 12:53:04 UTC
Is it possible to add a new style property for this, and make default value to FALSE? Then we can set it to TRUE in Wimp engine?
Comment 4 Hong Jen Yee 2006-06-03 09:07:19 UTC
Created attachment 66693 [details] [review]
A new patch adding a style property called "full-row-focus" instead of changing things unconditionally.

Since Tor Lillqvist says this shouldn't be changed unconditionally, I add a style 
property for it.
Here is a new patch adding a style property called "full-row-focus" instead of changing things unconditionally.
If the value of this style property is TRUE, draw the focus rectangle for the full selected row, when the tree view has focus.
We can turn on this property in Wimp theme engine to mimic the behavior of native Windows applications.
Comment 5 Philip Withnall 2007-05-28 12:39:17 UTC
The indentation for that if statement looks a little odd --- GTK uses spaces rather than hard tabs, which seem to have made an appearance in some lines.

It might be an idea to model the documentation for this new property after that of "rules-hint"; i.e. change the description to "Set a hint to the theme engine to draw a focus rectangle for a full row", as theme engines might ignore this property, while the ms-windows one will probably use it anyway.
Comment 6 Kristian Rietveld 2007-10-08 15:22:04 UTC
I don't think I would like a patch like this in GtkTreeView.  I also observed that the Wimp theme binds the left/right arrows keys to expand/collapse; this is very bad as it breaks key navigation in certain applications (see #465516 and related).  The appearance of the focus rectangle is vital for proper keyboard navigation.
Comment 7 Matthias Clasen 2018-02-10 04:39:40 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.