Re: Dark L&F and Notifications

Peter Hansson <[email protected]>
Newsgroups gmane.comp.java.netbeans.modules.openide.devel
Message-ID <CAC55jYOaPEthTR5Zr08qFpDWN5-vZ8hYaVg2=AD5Zr3nbDCjPg@mail.gmail.com>
I've just tried Darcula on my application and it has (as expected) exactly
the same challenge. The blue text on a dark background is more or less
impossible to read.

BTW: Darcula plugin for Netbeans is still on NB80, not NB81. This doesn't
mean that it will not work in a NB IDE 8.1 but it isn't a smooth sail. I'm
trying to upgrade it to NB 8.1.

Using the plugin with an RCP application as opposed to the IDE isn't as
simple as I hoped. The reason is some dependencies on Editor Color (for the
use of Themes I suppose) and this is just not available to normal RCP app.

On Tue, Feb 2, 2016 at 1:55 PM, geertjan wielenga <
[email protected]> wrote:

>
> On 2-2-2016 13:40, Peter Hansson wrote:
>
>>
>> In my RCP application I'm working with a dark L&F. Seems so popular these
>> days.
>>
>
> I advise you to try the Darcula look and feel instead:
>
> http://plugins.netbeans.org/plugin/62424/darcula-laf-for-netbeans
>
> Gj
>
>
>
>> The problem I have is with the standard Notifications, the little things
>> in the lower right hand of the main frame that comes up as a balloon
>> notification: The clickable text is just too hard (if not impossible) to
>> read on a dark background because it is hardcoded to Color.BLUE.
>>
>> I'm thinking that all implementers of a dark'ish L&F must have come
>> across this.
>>
>> The problem is with NotificationImpl in core.ui. If you look into the
>> source you'll see that the clickable text isn't actually a link but is
>> simply some underlined text (<html><u>) inside a JButton and then the
>> implementation does :
>>
>> btn.setForeground(Color.blue);
>>
>> Ouch!
>>
>> So the color is hardcoded.
>>
>> How to solve ?
>>
>> Thanks
>>
>> Peter
>>
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.