FlatLaf icon indicating copy to clipboard operation
FlatLaf copied to clipboard

Allow themes to describe FlatLaf standard styles

Open Chrriis opened this issue 5 years ago • 5 comments

Unless I am mistaken, there are several incompatible ways of defining the application to use FlatLaf:

  • Set the look and feel to a core FlatLaf class (FlatLightLaf, FlatDarkLaf, FlatIntelliJLaf, FlatDarculaLaf).
  • Load an IntelliJ theme.

It would be beneficial to have the possibility of defining all of the above cases in a coherent way. I think there should be an IntelliJ theme file defining the 4 core looks. This probably means enhancing the IntelliJ format to indicate whether to use chevrons or arrows, etc. If done right, these files could be loaded by IntelliJ, ignoring the FlatLaf specific definitions, and (who knows?) maybe one day be supported by IntelliJ so we get chevrons there too.

The benefit is that the application would not have to support 2 methods for loading FlatLaf: simply reference a theme file which can be replaced/tweaked. Configuration of that L&F would be completely external.

Chrriis avatar Feb 04 '20 07:02 Chrriis

I think that FlatLAF is actually of a higher order priority than an IJ theme. To the cosmos. If IntelliJ ceased to exist tomorrow, I would still want FlatLAF to exist in perpetuity. Themes are cool. IntelliJ Themes are not important in the big picture.

smileatom avatar Feb 05 '20 12:02 smileatom

@smileatom I personally do not care about IntelliJ, but the themes are a convenient way of having different color schemes shipped with the application. Currently you have to code a special case to have the default in addition to all the available color schemes.

Chrriis avatar Feb 05 '20 12:02 Chrriis

In the demo, there is already support for theming, but I didn't check the code, how does this work. It is just an info.

Chris2011 avatar Mar 06 '20 14:03 Chris2011

I have a similar question I think. For my application Im replacing the standard look and feel with FlatlafDark and FlatLafLight laf, and I let the user select from a list (put into a combo)

List<UIManager.LookAndFeelInfo> newLookAndFeels = new ArrayList<UIManager.LookAndFeelInfo>(); newLookAndFeels.add(new UIManager.LookAndFeelInfo("Light",FlatLightLaf.class.getName())); newLookAndFeels.add(new UIManager.LookAndFeelInfo("Dark", FlatDarkLaf.class.getName())); return newLookAndFeels;

But actually I want to replace FlatDarkLaf with the Git Dark theme as it seems a better match for MacOS Dark mode, not clear how I do this

ijabz avatar Mar 08 '22 08:03 ijabz

Im not clear is a theme installed independently of FlatLaf, or do you install one of the four core Flatlaf classes as the look and feel first and then install the theme over the top ?

ijabz avatar Mar 08 '22 09:03 ijabz