diff --git a/core/src/test/java/documentation/CreateUITable.java b/core/src/test/java/documentation/CreateUITable.java index bc32188fd..2705ce9fd 100644 --- a/core/src/test/java/documentation/CreateUITable.java +++ b/core/src/test/java/documentation/CreateUITable.java @@ -30,6 +30,7 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.logging.Logger; import java.util.stream.Collectors; import javax.imageio.ImageIO; @@ -50,6 +51,7 @@ import com.github.weisj.darklaf.parser.PrimitiveParser; import com.github.weisj.darklaf.theme.Theme; import com.github.weisj.darklaf.util.ImageUtil; +import com.github.weisj.darklaf.util.LogUtil; import com.github.weisj.darklaf.util.StringUtil; import com.github.weisj.darklaf.util.SystemInfo; import com.kitfox.svg.LinearGradient; @@ -60,6 +62,8 @@ public class CreateUITable { + private static final Logger LOGGER = LogUtil.getLogger(CreateUITable.class); + private static final int SAMPLE_WIDTH = 150; private static final int SAMPLE_HEIGHT = 25; @@ -74,6 +78,7 @@ public class CreateUITable { public static void main(final String[] args) throws IOException { for (Theme theme : LafManager.getRegisteredThemes()) { + LOGGER.info("Creating defaults table for " + theme.getDisplayName()); createThemeDefaultsPage(theme); } } @@ -260,7 +265,7 @@ private String parseImage(final String key, final Object value, final int ident) } private String createImage(final Object value, final String name, final Dimension size) throws IOException { - //noinspection ResultOfMethodCallIgnored + // noinspection ResultOfMethodCallIgnored new File(workingFolder + "img/").mkdirs(); String fileName = "img/" + name + "_" + SystemInfo.getOsName() + ".png"; File imageFile = new File(workingFolder + fileName); diff --git a/theme/src/main/java/com/github/weisj/darklaf/theme/HighContrastDarkTheme.java b/theme/src/main/java/com/github/weisj/darklaf/theme/HighContrastDarkTheme.java index 7a050070e..fa3112df5 100644 --- a/theme/src/main/java/com/github/weisj/darklaf/theme/HighContrastDarkTheme.java +++ b/theme/src/main/java/com/github/weisj/darklaf/theme/HighContrastDarkTheme.java @@ -25,6 +25,7 @@ import javax.swing.*; +import com.github.weisj.darklaf.PropertyLoader; import com.github.weisj.darklaf.annotations.SynthesiseLaf; import com.github.weisj.darklaf.theme.info.ColorToneRule; import com.github.weisj.darklaf.theme.info.ContrastRule; @@ -37,7 +38,7 @@ public class HighContrastDarkTheme extends Theme { @Override protected PresetIconRule getPresetIconRule() { - return PresetIconRule.NONE; + return PresetIconRule.DARK; } @Override @@ -70,6 +71,14 @@ public ContrastRule getContrastRule() { return ContrastRule.HIGH_CONTRAST; } + @Override + public void loadIconTheme(Properties properties, UIDefaults currentDefaults) { + // First load base theme + super.loadIconTheme(properties, currentDefaults); + // Then customize using our own values. + PropertyLoader.putProperties(loadPropertyFile("icons"), properties, currentDefaults); + } + @Override public void customizeUIProperties(final Properties properties, final UIDefaults currentDefaults) { super.customizeUIProperties(properties, currentDefaults); diff --git a/theme/src/main/java/com/github/weisj/darklaf/theme/HighContrastLightTheme.java b/theme/src/main/java/com/github/weisj/darklaf/theme/HighContrastLightTheme.java index 8a0b99c58..03b655385 100644 --- a/theme/src/main/java/com/github/weisj/darklaf/theme/HighContrastLightTheme.java +++ b/theme/src/main/java/com/github/weisj/darklaf/theme/HighContrastLightTheme.java @@ -25,6 +25,7 @@ import javax.swing.*; +import com.github.weisj.darklaf.PropertyLoader; import com.github.weisj.darklaf.annotations.SynthesiseLaf; import com.github.weisj.darklaf.theme.info.ColorToneRule; import com.github.weisj.darklaf.theme.info.ContrastRule; @@ -37,7 +38,7 @@ public class HighContrastLightTheme extends Theme { @Override protected PresetIconRule getPresetIconRule() { - return PresetIconRule.NONE; + return PresetIconRule.LIGHT; } @Override @@ -70,6 +71,14 @@ public ContrastRule getContrastRule() { return ContrastRule.HIGH_CONTRAST; } + @Override + public void loadIconTheme(Properties properties, UIDefaults currentDefaults) { + // First load base theme + super.loadIconTheme(properties, currentDefaults); + // Then customize using our own values. + PropertyLoader.putProperties(loadPropertyFile("icons"), properties, currentDefaults); + } + @Override public void customizeUIProperties(final Properties properties, final UIDefaults currentDefaults) { super.customizeUIProperties(properties, currentDefaults);