Bug 327260 - Often can't see focus ring in Trees on Windows 7
Summary: Often can't see focus ring in Trees on Windows 7
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.7   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 3.7 M7   Edit
Assignee: Felipe Heidrich CLA
QA Contact:
URL:
Whiteboard:
Keywords: accessibility
Depends on:
Blocks:
 
Reported: 2010-10-07 13:23 EDT by Markus Keller CLA
Modified: 2011-05-02 08:54 EDT (History)
1 user (show)

See Also:


Attachments
patch (1.42 KB, patch)
2011-03-24 11:29 EDT, Felipe Heidrich CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Keller CLA 2010-10-07 13:23:36 EDT
N20101003-2000, same in 3.6 and 3.5.2

I often can't see the focus ring in Trees on Windows 7.

On WinXP, I could always see which item had the keyboard focus (dotted focus ring). On Win7, I only see the focus item on plain SWT.MULTI trees and only if the focus is on an unselected item.

If the focus is on a selected item, it is not drawn.
In trees with an SWT.EraseItem listener, the focus is never drawn.
Comment 1 Markus Keller CLA 2011-03-23 13:34:21 EDT
In the Windows Explorer, the focus is drawn a bit differently, but there I can always see which item has the focus (at least after I've moved to focus with Ctrl+Up/Down).

In Tables, the focus ring is always drawn (good).
Comment 2 Felipe Heidrich CLA 2011-03-24 11:28:19 EDT
(In reply to comment #0)
> If the focus is on a selected item, it is not drawn.
this is the right behaviour on the platform (not a bug)

> In trees with an SWT.EraseItem listener, the focus is never drawn.

this is bug and it should be fixed.
Comment 3 Felipe Heidrich CLA 2011-03-24 11:29:34 EDT
Created attachment 191834 [details]
patch
Comment 4 Felipe Heidrich CLA 2011-03-24 11:30:03 EDT
Fixed in HEAD
Comment 5 Markus Keller CLA 2011-03-26 17:56:47 EDT
> > If the focus is on a selected item, it is not drawn.
> this is the right behaviour on the platform (not a bug)

So that means that trees have a different "right" platform behaviour than tables and the Windows Explorer? On XP, the focus ring was always visible.


> > In trees with an SWT.EraseItem listener, the focus is never drawn.
> this is bug and it should be fixed.

Thanks, verified for trees without FULL_SELECTION. With full selection, bug 148364 is still present.
Comment 6 Felipe Heidrich CLA 2011-03-28 09:56:30 EDT
(In reply to comment #5)
> So that means that trees have a different "right" platform behaviour than
> tables and the Windows Explorer? On XP, the focus ring was always visible.

I compared regular tree drawing focus ring (OS drawing) and custom draw tree (SWT drawing), the result is very close.

What were you expecting ?
Comment 7 Markus Keller CLA 2011-03-28 12:11:32 EDT
(In reply to comment #6)
> I compared regular tree drawing focus ring (OS drawing) and custom draw tree
> (SWT drawing), the result is very close.

Yes, they both look the same now, but the focus ring is not visible in both cases when the item is selected. On XP, the focus ring was always visible.

> What were you expecting ?

I didn't find a native multi-selection tree in the OS, so I don't know what's the native behavior. But I would expect it to be close to what I can see in tables. On XP, multi-selection in trees was rendered like in tables. On Win 7, I often see the XP-style tables.

But e.g. in the Windows Explorer in List and in Details mode, I see the new style with a blue rounded rect for the focus item, a light blue background for selected items, and a slightly darker blue background for a selected item with focus. The focus color is hard to spot in a screenshot, but it's easy to see when you move the focus with Ctrl+Up/Down.
Comment 8 Markus Keller CLA 2011-03-29 10:12:54 EDT
I found another small difference between plain trees and owner-drawn trees: In plain trees (e.g. Navigator), the item under the mouse gets the slightly darker blue background (same color as the focused selected item or the hovered item in Windows Explorer).

In owner-drawn trees (e.g. Package Explorer), a selected item has no special color when it is under the mouse.
Comment 9 Markus Keller CLA 2011-05-02 08:54:38 EDT
Filed bug 344443 for the remaining issues.