From a9be53454fdceb4c6e78f2c24f6af0585c6f0edb Mon Sep 17 00:00:00 2001 From: Jannis Weis <31143295+weisJ@users.noreply.github.com> Date: Tue, 1 Feb 2022 23:49:14 +0100 Subject: [PATCH] Tests: Fix compilation errors --- .../com/github/weisj/darklaf/icon/AllIconsDemo.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/core/src/test/java/com/github/weisj/darklaf/icon/AllIconsDemo.java b/core/src/test/java/com/github/weisj/darklaf/icon/AllIconsDemo.java index 88a4a6f3..d505856b 100644 --- a/core/src/test/java/com/github/weisj/darklaf/icon/AllIconsDemo.java +++ b/core/src/test/java/com/github/weisj/darklaf/icon/AllIconsDemo.java @@ -34,6 +34,7 @@ import com.github.weisj.darklaf.core.test.util.ClassFinder; import com.github.weisj.darklaf.core.test.util.Instantiable; import com.github.weisj.darklaf.core.test.util.ResourceWalker; import com.github.weisj.darklaf.platform.decorations.DecorationsProvider; +import com.github.weisj.darklaf.properties.PropertyLoader; import com.github.weisj.darklaf.properties.icons.IconLoader; import com.github.weisj.darklaf.properties.icons.ThemedSVGIcon; import com.github.weisj.darklaf.ui.demo.BaseComponentDemo; @@ -58,7 +59,14 @@ public class AllIconsDemo extends BaseComponentDemo { .collect(Collectors.toList()); LafManager.registerInitTask((currentTheme, defaults) -> { Properties props = new Properties(); - decorationsProviders.forEach(provider -> provider.loadDecorationProperties(props, defaults)); + decorationsProviders.forEach(provider -> { + IconLoader iconLoader = IconLoader.get(provider.getClass()); + for (String path : provider.getPropertyResourcePaths()) { + PropertyLoader.putProperties( + PropertyLoader.loadProperties(provider.getClass(), path, ""), + props, defaults, iconLoader); + } + }); defaults.putAll(props); }); }