diff --git a/CHANGELOG.md b/CHANGELOG.md index 94942350..f1a4aa2e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ FlatLaf Change Log - Support using IntelliJ platform themes (.theme.json files). - Support `JFileChooser`. (issue #5) +- Look and feel identifier returned by `FlatLaf.getID()` now always starts with + "FlatLaf". Use `UIManager.getLookAndFeel().getID().startsWith( "FlatLaf" )` to + check whether the current look and feel is FlatLaf. - Fixed selection background of checkbox in table cell. - Fixed jittery submenu rendering on Mac. (issue #10) - JIDE Common Layer: Fixed `JidePopup` border. diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatLaf.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatLaf.java index 00050ea2..6984ebb5 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatLaf.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatLaf.java @@ -71,9 +71,17 @@ public abstract class FlatLaf } } + /** + * Returns the look and feel identifier. + *

+ * Syntax: "FlatLaf - ${theme-name}" + *

+ * Use {@code UIManager.getLookAndFeel().getID().startsWith( "FlatLaf" )} + * to check whether the current look and feel is FlatLaf. + */ @Override public String getID() { - return getName(); + return "FlatLaf - " + getName(); } public abstract boolean isDark();