diff --git a/core/src/main/java/com/github/weisj/darklaf/DarkLaf.java b/core/src/main/java/com/github/weisj/darklaf/DarkLaf.java index 5411908b..8cd33813 100644 --- a/core/src/main/java/com/github/weisj/darklaf/DarkLaf.java +++ b/core/src/main/java/com/github/weisj/darklaf/DarkLaf.java @@ -57,6 +57,7 @@ import java.util.logging.Logger; public class DarkLaf extends BasicLookAndFeel implements PropertyChangeListener { + public static final String SYSTEM_PROPERTY_PREFIX = "darklaf."; private static final Logger LOGGER = Logger.getLogger(DarkLaf.class.getName()); private static final String NAME = "Darklaf"; private final BasicLookAndFeel base; @@ -225,8 +226,8 @@ public class DarkLaf extends BasicLookAndFeel implements PropertyChangeListener private void loadSystemOverwrites(final Properties uiProps, final UIDefaults defaults) { Properties overwrites = PropertyLoader.loadProperties(DarkLaf.class, "overwrites", "properties/"); - overwrites.values().removeIf(v -> System.getProperty(v.toString()) == null); - overwrites.entrySet().forEach(e -> e.setValue(System.getProperty(e.getValue().toString()))); + overwrites.values().removeIf(v -> System.getProperty(SYSTEM_PROPERTY_PREFIX + v.toString()) == null); + overwrites.entrySet().forEach(e -> e.setValue(System.getProperty(SYSTEM_PROPERTY_PREFIX + e.getValue().toString()))); PropertyLoader.putProperties(overwrites, uiProps, defaults); } diff --git a/core/src/main/java/com/github/weisj/darklaf/platform/Decorations.java b/core/src/main/java/com/github/weisj/darklaf/platform/Decorations.java index cf34a001..ab5813b5 100644 --- a/core/src/main/java/com/github/weisj/darklaf/platform/Decorations.java +++ b/core/src/main/java/com/github/weisj/darklaf/platform/Decorations.java @@ -23,6 +23,7 @@ */ package com.github.weisj.darklaf.platform; +import com.github.weisj.darklaf.DarkLaf; import com.github.weisj.darklaf.LafManager; import com.github.weisj.darklaf.decorations.CustomTitlePane; import com.github.weisj.darklaf.decorations.DecorationsProvider; @@ -60,7 +61,7 @@ public final class Decorations { public static boolean isCustomDecorationSupported() { return decorationsProvider.isCustomDecorationSupported() - && !"false".equals(System.getProperty("darklaf.decorations")) + && !"false".equals(System.getProperty(DarkLaf.SYSTEM_PROPERTY_PREFIX + "decorations")) && LafManager.isDecorationsEnabled() && LafManager.getTheme().useCustomDecorations(); }