Bug 169859 - [Forms] Hyperlink widget should be rendered gray when disabled
Summary: [Forms] Hyperlink widget should be rendered gray when disabled
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: User Assistance (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.5 M1   Edit
Assignee: Adam Archer CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 261866 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-01-08 11:57 EST by Markus Keller CLA
Modified: 2009-01-23 14:42 EST (History)
6 users (show)

See Also:


Attachments
patch to paint disabled links grey (6.66 KB, patch)
2008-07-14 14:43 EDT, Adam Archer CLA
no flags Details | Diff
patch to paint disabled links as text (1.62 KB, patch)
2008-07-14 16:12 EDT, Adam Archer CLA
no flags Details | Diff
patch to blend disabled links into background (4.06 KB, patch)
2008-07-15 13:17 EDT, Adam Archer 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 2007-01-08 11:57:36 EST
N20070108-0010

The Hyperlink widget should be rendered gray when disabled (like the Link widget). Currently, it looks the same as if enabled (but does not change to "active" when the mouse points to it).
Comment 1 Adam Archer CLA 2008-07-07 11:29:03 EDT
*** Bug 202536 has been marked as a duplicate of this bug. ***
Comment 2 Adam Archer CLA 2008-07-07 11:30:40 EDT
Need to ensure that ImageHyperlink paints disabled as well when this is
addressed (as discussed in bug 202536).
Comment 3 Adam Archer CLA 2008-07-14 14:43:45 EDT
Created attachment 107358 [details]
patch to paint disabled links grey

This patch adds API to set the disabled color for specific Hyperlinks and on HyperlinkSettings. It also defaults the color to SWT.GREY. Unfortunately this solution is not good enough. This will not work if, for instance, the link is on a grey background. It will just disappear. This is uncharted territory as in the web there isn't really a concept of a disabled link.

I think a good solution here would be to simply render the disabled link with the text foreground color and without the underline (i.e. paint it as text). I just wanted to see what people would think of this solution before I go ahead with it.

Any thoughts?
Comment 4 Adam Archer CLA 2008-07-14 16:12:15 EDT
Created attachment 107380 [details]
patch to paint disabled links as text

This patch causes hyperlinks to paint as static text.
Comment 5 Adam Archer CLA 2008-07-15 11:54:30 EDT
I tested out the patch in comment 5 and it looks strange. It makes the hyperlinks look like weird, out of place text.

I think I've come up with a winning solution though. I'm going to simply blend the foreground colour into the background colour. This should be visible and look disabled for all colour settings. With typical settings, this will cause disabled links to look blue-grey (blue links on a white background).
Comment 6 Adam Archer CLA 2008-07-15 13:17:36 EDT
Created attachment 107495 [details]
patch to blend disabled links into background

The only potential problem with this patch is that if anyone has worked around the problem by changing the foreground colour themselves (when disabled), it will be their custom foreground colour that we blend. This could result in very light/hard to read links when disabled.

Making the change now should give any affected parties time to discover the problem and remove their workarounds.
Comment 7 Adam Archer CLA 2008-07-15 13:34:30 EDT
Patch applied to HEAD. Reopening bug 202536 to address the ImageHyperlink.
Comment 8 Adam Archer CLA 2009-01-23 14:34:45 EST
*** Bug 261866 has been marked as a duplicate of this bug. ***