From 5b48740f320fafbc554dd26c5292a6f15e15a5bb Mon Sep 17 00:00:00 2001 From: weisj Date: Sun, 19 Apr 2020 00:44:35 +0200 Subject: [PATCH] fixed loading of html image icons. --- .../github/weisj/darklaf/PropertyLoader.java | 31 +++++++++---------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/property-loader/src/main/java/com/github/weisj/darklaf/PropertyLoader.java b/property-loader/src/main/java/com/github/weisj/darklaf/PropertyLoader.java index 90aae35e..c53292cb 100644 --- a/property-loader/src/main/java/com/github/weisj/darklaf/PropertyLoader.java +++ b/property-loader/src/main/java/com/github/weisj/darklaf/PropertyLoader.java @@ -24,33 +24,32 @@ */ package com.github.weisj.darklaf; +import com.github.weisj.darklaf.icons.DarkUIAwareIcon; +import com.github.weisj.darklaf.icons.EmptyIcon; +import com.github.weisj.darklaf.icons.IconLoader; +import com.github.weisj.darklaf.icons.StateIcon; +import com.github.weisj.darklaf.util.ColorUtil; +import com.github.weisj.darklaf.util.Pair; +import com.github.weisj.darklaf.util.PropertyValue; + +import javax.swing.*; +import javax.swing.plaf.ColorUIResource; +import javax.swing.plaf.DimensionUIResource; +import javax.swing.plaf.FontUIResource; +import javax.swing.plaf.InsetsUIResource; import java.awt.*; import java.awt.font.TextAttribute; import java.io.IOException; import java.io.InputStream; import java.text.AttributedCharacterIterator; -import java.util.*; import java.util.List; +import java.util.*; import java.util.function.Function; import java.util.function.Predicate; import java.util.logging.Level; import java.util.logging.Logger; import java.util.stream.Collectors; -import javax.swing.*; -import javax.swing.plaf.ColorUIResource; -import javax.swing.plaf.DimensionUIResource; -import javax.swing.plaf.FontUIResource; -import javax.swing.plaf.InsetsUIResource; - -import com.github.weisj.darklaf.icons.DarkUIAwareIcon; -import com.github.weisj.darklaf.icons.EmptyIcon; -import com.github.weisj.darklaf.icons.IconLoader; -import com.github.weisj.darklaf.icons.StateIcon; -import com.github.weisj.darklaf.util.ColorUtil; -import com.github.weisj.darklaf.util.Pair; -import com.github.weisj.darklaf.util.PropertyValue; - /** * @author Konstantin Bulenkov * @author Jannis Weis @@ -192,7 +191,7 @@ public final class PropertyLoader { return (UIDefaults.ActiveValue) (def) -> parseObject(value); } else if (key.toLowerCase().endsWith("font")) { returnVal = parseFont(key, value, accumulator, currentDefaults); - } else if (key.endsWith(".icon") || key.endsWith("Icon")) { + } else if (key.endsWith(".icon") || key.endsWith("Icon") || key.endsWith("Image")) { returnVal = parseIcon(value, accumulator, currentDefaults, iconLoader); } else if (key.endsWith("Size") || key.endsWith(".size")) { returnVal = parseSize(value);