diff --git a/src/main/java/com/github/weisj/darklaf/icons/DarkSVGIcon.java b/src/main/java/com/github/weisj/darklaf/icons/DarkSVGIcon.java index 186a6f4e..8f95636c 100644 --- a/src/main/java/com/github/weisj/darklaf/icons/DarkSVGIcon.java +++ b/src/main/java/com/github/weisj/darklaf/icons/DarkSVGIcon.java @@ -30,9 +30,11 @@ import org.jetbrains.annotations.NotNull; import javax.swing.*; import java.awt.*; import java.awt.geom.AffineTransform; +import java.io.File; import java.io.Serializable; import java.net.URI; import java.util.concurrent.atomic.AtomicBoolean; +import java.util.logging.Logger; /** * Icon from SVG image. @@ -42,6 +44,7 @@ import java.util.concurrent.atomic.AtomicBoolean; */ public class DarkSVGIcon implements Icon, Serializable { + private static final Logger LOGGER = Logger.getLogger(DarkSVGIcon.class.getName()); private final Dimension size; private final SVGIcon icon; private final URI uri; @@ -87,6 +90,8 @@ public class DarkSVGIcon implements Icon, Serializable { private void ensureLoaded() { if (!loaded.get()) { + File file = new File(uri); + LOGGER.info("Loading icon '" + file.getName() + "'."); icon.setSvgURI(uri); loaded.set(true); } diff --git a/src/main/java/com/github/weisj/darklaf/icons/IconLoader.java b/src/main/java/com/github/weisj/darklaf/icons/IconLoader.java index 3dd43042..04303976 100644 --- a/src/main/java/com/github/weisj/darklaf/icons/IconLoader.java +++ b/src/main/java/com/github/weisj/darklaf/icons/IconLoader.java @@ -136,7 +136,6 @@ public final class IconLoader { @NotNull public Icon loadSVGIcon(@NotNull final String name, final int w, final int h, final boolean themed) { try { - LOGGER.info("Loading icon '" + name + "'. Resolving from " + parentClass); if (themed) { return new ThemedSVGIcon(Objects.requireNonNull(parentClass.getResource(name).toURI()), w, h); } else { diff --git a/src/main/java/com/github/weisj/darklaf/icons/LazyIcon.java b/src/main/java/com/github/weisj/darklaf/icons/LazyIcon.java index acd3de4c..b0d920ec 100644 --- a/src/main/java/com/github/weisj/darklaf/icons/LazyIcon.java +++ b/src/main/java/com/github/weisj/darklaf/icons/LazyIcon.java @@ -28,12 +28,14 @@ import org.jetbrains.annotations.Contract; import javax.swing.*; import javax.swing.plaf.UIResource; import java.awt.*; +import java.util.logging.Logger; /** * @author Jannis Weis */ public abstract class LazyIcon implements Icon, UIResource { + private static final Logger LOGGER = Logger.getLogger(LazyIcon.class.getName()); protected final String path; protected final IconLoader.IconKey key; protected final Class parentClass; @@ -55,6 +57,7 @@ public abstract class LazyIcon implements Icon, UIResource { private void ensureLoaded() { if (!loaded) { + LOGGER.info("Loading icon '" + path + "'. Resolving from " + parentClass); icon = loadIcon(); loaded = true; if (icon == null) {