mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-11 22:47:13 -06:00
FlatLaf.isLafDark() added
This commit is contained in:
@@ -598,12 +598,7 @@ public class FlatDisabledIconsTest
|
||||
}
|
||||
|
||||
private ImageIcon getCurrentIcon() {
|
||||
return isDark() ? darkIcon : lightIcon;
|
||||
}
|
||||
|
||||
private boolean isDark() {
|
||||
LookAndFeel lookAndFeel = UIManager.getLookAndFeel();
|
||||
return lookAndFeel instanceof FlatLaf && ((FlatLaf)lookAndFeel).isDark();
|
||||
return FlatLaf.isLafDark() ? darkIcon : lightIcon;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -399,8 +399,7 @@ public class FlatTestFrame
|
||||
boolean explicit = explicitColorsCheckBox.isSelected();
|
||||
ColorUIResource restoreColor = new ColorUIResource( Color.white );
|
||||
|
||||
LookAndFeel lookAndFeel = UIManager.getLookAndFeel();
|
||||
boolean dark = (lookAndFeel instanceof FlatLaf && ((FlatLaf)lookAndFeel).isDark());
|
||||
boolean dark = FlatLaf.isLafDark();
|
||||
Color magenta = dark ? Color.magenta.darker() : Color.magenta;
|
||||
Color orange = dark ? Color.orange.darker() : Color.orange;
|
||||
Color blue = dark ? Color.blue.darker() : Color.blue;
|
||||
|
||||
Reference in New Issue
Block a user