| Summary: | [Widgets] Link widget has hardcoded color | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Wassim Melhem <wassim.melhem> | ||||
| Component: | SWT | Assignee: | Project Inbox <swt-triaged> | ||||
| Status: | CLOSED DUPLICATE | QA Contact: | Felipe Heidrich <eclipse.felipe> | ||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | grendel.b.wulf, hihn, markus.kell.r, peter, prof7bit | ||||
| Version: | 3.1 | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Wassim Melhem
Created attachment 35729 [details]
product editor
The "product editor" link is a native SWT link.
The hyperlinks in the Testing section are rendered by FormText.
This is not a bug. SWT hyperlink uses WS system colors. Forms hyperlinks and FormText widget use settings for JFaceColors.getHyperlinkText(Display) and JFaceColors.getActiveHyperlinkText(Display). We are not managing SWT hyperlinks, and they don't know anything about JFaceColors (or JFace for that matter). I would love to tell you to set the colors yourself, but unfortunately SWT Link widget has chosen to hardcode the RGB for it and does not allow you to change it. If you need a simple link with a matching color, use UI Form's Hyperlink instead. If you need to mix some static text with links inside it, you can only use FormText. I recommend moving this defect to SWT to encourage them to expose link color property as API. While they are at it, they can also expose 'hover/active link color' that is applied when the mouse is inside the link. adjusting summary and moving to SWT. The user should be able to set the color of the Link widget. On Windows Xp we use the native link widget (syslink), and it doesn't provide the APIs you asked. Your bug has been moved to triage, visit http://www.eclipse.org/swt/triage.php for more info. (In reply to Felipe Heidrich from comment #4) > On Windows Xp we use the native link widget (syslink), and it doesn't > provide the APIs you asked. Note that in Windows, you can set the link color through system settings. This is a better situation than on GTK (for example), where the color is straight-up hardcoded and cannot be changed. For reference, the hardcoded value is defined in Link.java like so: static final RGB LINK_FOREGROUND = new RGB (0, 51, 153); And used, later on, like so: linkColor = new Color (display, LINK_FOREGROUND); This situation is rather annoying, when trying to use a dark theme :( (In reply to Grendel Wulf from comment #7) > Note that in Windows, you can set the link color through system settings. > This is a better situation than on GTK (for example), where the color is > straight-up hardcoded and cannot be changed. GTK also uses the OS color since 4.3, see bug 181592. *** This bug has been marked as a duplicate of bug 181592 *** This bug is not fixed! I'm using Kepler on Kubuntu and there still exists no way to adjust the hyperlink colors, system settings are ignored. |