mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-12 06:57:13 -06:00
FlatLaf.isLafDark() added
This commit is contained in:
@@ -113,6 +113,14 @@ public abstract class FlatLaf
|
||||
|
||||
public abstract boolean isDark();
|
||||
|
||||
/**
|
||||
* Checks whether the current look and feel is dark.
|
||||
*/
|
||||
public static boolean isLafDark() {
|
||||
LookAndFeel lookAndFeel = UIManager.getLookAndFeel();
|
||||
return lookAndFeel instanceof FlatLaf && ((FlatLaf)lookAndFeel).isDark();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether FlatLaf supports custom window decorations.
|
||||
* This depends on the operating system and on the used Java runtime.
|
||||
|
||||
Reference in New Issue
Block a user