This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 229770 - [Dark theme] Link is hard to read
Summary: [Dark theme] Link is hard to read
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 7.4
Hardware: All All
: P3 normal (vote)
Assignee: Stanislav Aubrecht
URL:
Keywords:
: 231454 232733 (view as bug list)
Depends on:
Blocks: 229850
  Show dependency tree
 
Reported: 2013-05-15 10:35 UTC by Tomas Mysik
Modified: 2013-07-18 14:47 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
screenshot (65.02 KB, image/png)
2013-05-15 10:35 UTC, Tomas Mysik
Details
screenshot of code completion (44.57 KB, image/png)
2013-06-20 07:36 UTC, Tomas Mysik
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Mysik 2013-05-15 10:35:34 UTC
Created attachment 134458 [details]
screenshot

HTML link [1] is hard to read, have a look at the screenshot.

Thanks.
[1] In code, I simply use: <a href="#">My link</a>

Product Version: NetBeans IDE Dev (Build 20130515-389b22ca4c9f)
Java: 1.7.0_21; Java HotSpot(TM) 64-Bit Server VM 23.21-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_21-b11
System: Linux version 3.8.0-19-generic running on amd64; UTF-8; cs_CZ (nb)
Comment 1 Stanislav Aubrecht 2013-05-23 13:32:50 UTC
The HTML foreground color comes from a CSS file defined in Java runtime folder. There's no way to override that color for the default HTML rendering.

However you can adjust the foreground color yourself by extracting it from UIManager like this:

Color htmlForeground = UIManager.getColor("nb.html.link.foreground");
if( htmlForeground != null )
   lable.setForeground( htmlForeground );
Comment 2 Tomas Mysik 2013-05-24 04:48:10 UTC
Thanks a lot for the hint, I will do that.
Comment 3 Tomas Mysik 2013-05-24 06:57:47 UTC
Stando, I tried it and got: 164, 164, 255 - is it expected? It seems to be still quite dark...

Thanks.
Comment 4 Stanislav Aubrecht 2013-05-24 07:05:10 UTC
(In reply to comment #3)
> Stando, I tried it and got: 164, 164, 255 - is it expected? It seems to be
> still quite dark...
> 
> Thanks.

Yes, that's the color used for HTML links in other places in the IDE.
Comment 5 Tomas Mysik 2013-05-24 07:23:51 UTC
(In reply to comment #1)
> Color htmlForeground = UIManager.getColor("nb.html.link.foreground");
> if( htmlForeground != null )
>    lable.setForeground( htmlForeground );

Stando, this code does not work - if I set:

updateLibrariesLabel.setForeground(Color.GREEN);

the color is still blue...
Comment 6 Tomas Mysik 2013-06-20 07:33:06 UTC
Sorry, have to reopen, we need to fix this. For example, links in Javadoc window are not readable - this is bad in code completion (method parameters are often links) which is used very often... Stando, what do now? "Convert" this issue to some umbrella and create separate issues for each area? BTW please notice that your hint does not work, at least for me (see my previous comment).

Adding Marian to CC, I think we will do some deep testing of dark theme before FCS so perhaps we will know what to do with this issue?

Thanks.
Comment 7 Marian Mirilovic 2013-06-20 07:34:54 UTC
(In reply to comment #6)
> Adding Marian to CC, I think we will do some deep testing of dark theme before
> FCS so perhaps we will know what to do with this issue?

Yes, I planned to test it after Beta.
Comment 8 Tomas Mysik 2013-06-20 07:36:22 UTC
Created attachment 136062 [details]
screenshot of code completion
Comment 9 Stanislav Aubrecht 2013-06-20 08:00:02 UTC
I don't have any fix for this problem (short of customizing CSS style sheet for every HTML document instance), see comment #1

Patch is welcome.
Comment 10 Stanislav Aubrecht 2013-06-20 12:13:01 UTC
*** Bug 231454 has been marked as a duplicate of this bug. ***
Comment 11 Stanislav Aubrecht 2013-07-15 10:07:11 UTC
core-main ce4ad8b6a8d2
Comment 12 Stanislav Aubrecht 2013-07-16 09:48:36 UTC
*** Bug 232733 has been marked as a duplicate of this bug. ***
Comment 13 Quality Engineering 2013-07-18 02:35:46 UTC
Integrated into 'main-silver', will be available in build *201307172300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/ce4ad8b6a8d2
User: S. Aubrecht <saubrecht@netbeans.org>
Log: #229770 - change the default HTML link foreground color when using dark color laf theme
Comment 14 Tomas Mysik 2013-07-18 05:22:32 UTC
Verified, thanks a lot Stando!

Product Version: NetBeans IDE Dev (Build 20130718-58d6a3ece26d)
Java: 1.7.0_25; Java HotSpot(TM) 64-Bit Server VM 23.25-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_25-b15
System: Linux version 3.8.0-26-generic running on amd64; UTF-8; cs_CZ (nb)
Comment 15 Tomas Mysik 2013-07-18 05:28:23 UTC
Guys, every NB developer should check his modules for usage of any specific color in links (all these should be replaced by simple <a href="#">...</a>) - should I write to nbdev mailing list? Or is there a better way to do so?

Thanks.
Comment 16 Stanislav Aubrecht 2013-07-18 14:47:17 UTC
(In reply to comment #15)
> Guys, every NB developer should check his modules for usage of any specific
> color in links (all these should be replaced by simple <a href="#">...</a>) -
> should I write to nbdev mailing list?
Good idea!