laf.dark flag added to UI defaults

This commit is contained in:
Karl Tauber
2020-09-20 10:59:50 +02:00
parent c9da4fcaf1
commit 9de9983416
5 changed files with 8 additions and 0 deletions

View File

@@ -344,6 +344,10 @@ public abstract class FlatLaf
public UIDefaults getDefaults() {
UIDefaults defaults = super.getDefaults();
// add flag that indicates whether the LaF is light or dark
// (can be queried without using FlatLaf API)
defaults.put( "laf.dark", isDark() );
// add resource bundle for localized texts
defaults.addResourceBundle( "com.formdev.flatlaf.resources.Bundle" );