Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 347149

Summary: Tree viewer doesn't have visible focus row on Windows OS
Product: [Tools] MAT Reporter: Andrew Johnson <andrew_johnson>
Component: GUIAssignee: Andrew Johnson <andrew_johnson>
Status: RESOLVED FIXED QA Contact:
Severity: minor    
Priority: P3 CC: krum.tsvetkov
Version: 1.1Keywords: accessibility
Target Milestone: ---   
Hardware: All   
OS: Windows XP   
Whiteboard:
Bug Depends on: 358733    
Bug Blocks: 300655    
Attachments:
Description Flags
Tree without focus
none
Expected focus box none

Description Andrew Johnson CLA 2011-05-25 09:16:58 EDT
The tree viewer doesn't have a dotted box around the current tree item. This makes keyboard navigation hard as it is difficult to see what would get expanded or selected with the space bar. It is also hard to see that a tree has focus as when the tree is created no row is selected either.

This seems to be a Windows problem - without SWT.FULL_SELECTION the focus text is indicated with a box, but then only the first column text makes the row selectable.
Comment 1 Andrew Johnson CLA 2011-05-25 09:25:47 EDT
Created attachment 196549 [details]
Tree without focus

The first row should have a dotted box around it to show it has focus.
Comment 2 Andrew Johnson CLA 2011-05-25 09:35:30 EDT
Created attachment 196550 [details]
Expected focus box

The expected focus box would be like this grey box, but much thinner, dotted and in the foreground colour (black).
Comment 3 Andrew Johnson CLA 2011-05-25 10:13:58 EDT
I have a fix - by adding a gc.drawFocus in a paint listener on the tree.
Comment 4 Andrew Johnson CLA 2011-06-29 10:11:04 EDT
This fix works for Windows XP, but I have a report that it doesn't make a difference for Windows 7.
It is still worth doing for Windows XP.
Comment 5 Andrew Johnson CLA 2011-06-29 10:37:37 EDT
Fixed on Windows XP
Comment 6 Andrew Johnson CLA 2011-11-01 17:00:47 EDT
A fix for Windows 7 is to also draw the box on SWT.EraseItem
Comment 7 Andrew Johnson CLA 2011-11-01 17:03:39 EDT
Fix applied for Windows 7 - also applied unrelated fix to TreeAdapter.indexOf.