You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@netbeans.apache.org by Ernie Rael <er...@raelity.com> on 2020/02/26 02:37:20 UTC

compatibility with dark look and feel

The jVi plugin has two issues with the dark look and feels. Icons and 
jVi colors.

I downloaded gimp and will attack the icons. The jVi colors show up in 
the jVi options dialog where you can set them, there's also a "default" 
button for each color; an example jVi color is the VisualBellColor. For 
each color I'd like to have a default compatible with the current look 
and feel.

I've never worked with swing UI color and LaF stuff. Any links that 
might help me understand how to find good colors appreciated.

I'd guess I need to examine the current colors/settings and use that 
info to select colors. I guess I could hardcode colors for each known 
laf, but it would be nice to have a technique that's dynamic based on 
current colors...

-ernie


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
For additional commands, e-mail: dev-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists




Re: compatibility with dark look and feel

Posted by Alessandro <al...@gmail.com>.
Hi Ernie,
  the usual way to handle the choice of colors is to use
UIManager.getColor("laf_color_name") and choose a suitable "laf_color_name".
Every LAF define a set of color names, there are some basic ones (e.g.
selection, text, shadow, button face, etc.) and some widget specific ones
(e.g. button disabled text). Have a look at UIManager class javadoc here:
https://docs.oracle.com/javase/8/docs/api/javax/swing/UIManager.html section
"Defaults".

The list of available default names (which include colors) for a given LAF
is obtainable with UIManager.getDefaults().keys() . The main problem is
usually to choose a laf color name that is available in all LAFs.

A very nice HTML view of defaults for the Nimbus LAF is available at:
https://docs.oracle.com/javase/tutorial/uiswing/lookandfeel/_nimbusDefaults.html

Hope it helps.

Alex

Il giorno mer 26 feb 2020 alle ore 03:37 Ernie Rael <er...@raelity.com> ha
scritto:

> The jVi plugin has two issues with the dark look and feels. Icons and
> jVi colors.
>
> I downloaded gimp and will attack the icons. The jVi colors show up in
> the jVi options dialog where you can set them, there's also a "default"
> button for each color; an example jVi color is the VisualBellColor. For
> each color I'd like to have a default compatible with the current look
> and feel.
>
> I've never worked with swing UI color and LaF stuff. Any links that
> might help me understand how to find good colors appreciated.
>
> I'd guess I need to examine the current colors/settings and use that
> info to select colors. I guess I could hardcode colors for each known
> laf, but it would be nice to have a technique that's dynamic based on
> current colors...
>
> -ernie
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: dev-help@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>
>
>
>