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

Bug 329101

Summary: sapphire links should be consistent with native link appearance
Product: z_Archived Reporter: Konstantin Komissarchik <konstantin>
Component: SapphireAssignee: Ling Hao <ling.hao>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Konstantin Komissarchik CLA 2010-10-29 16:11:05 EDT
SWT has a native Link widget, which at least on Windows 7 renders light blue.
JFace/Forms has Hyperlink and FormText classes that use colors from JFace
themes. The link color is typically dark blue.

There is a Platform UI bug open to make Hyperlink and FormText classes
default to native link colors:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=181592

As the above bug has been open for considerable length of time without
resolution, the task for us is to identify a workaround for UI rendered with
Sapphire.

The first task is to identify all places where Sapphire renders links. If a
link is presented without any surrounding text, then it should be possible to
simply replace the use of Hyperlink class with Link class. If link is
presented inside FormText, we need something more clever. A Windows-only
solution that checks for OS and hardcodes the color to the native light blue
would be acceptable, if that's the only workable approach. Note that we also
should suppress on-hover color as that behavior is not present in the native
control.

The SWT Link control has basic ability to embed multiple links inside text,
but it is not a general replacement for places where we use FormText. The
fundamental limitation is that the surrounding text is not
focusable/selectable. I also noticed that the mouse cursor doesn't always
change correctly when transitioning from linked text to unlinked text. In
short, using SWT Link control is only appropriate for cases where the entire
text to be presented is a link.
Comment 1 Konstantin Komissarchik CLA 2010-12-15 17:27:49 EST
This has been fixed as part a fix for another bug.
Comment 2 Konstantin Komissarchik CLA 2010-12-15 17:28:13 EST
Verified using samples.