Community
Participate
Working Groups
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.
This has been fixed as part a fix for another bug.
Verified using samples.