Browse Source

fixed loading of html image icons.

pull/139/head
weisj 5 years ago
parent
commit
5b48740f32
  1. 31
      property-loader/src/main/java/com/github/weisj/darklaf/PropertyLoader.java

31
property-loader/src/main/java/com/github/weisj/darklaf/PropertyLoader.java

@ -24,33 +24,32 @@
*/ */
package com.github.weisj.darklaf; 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.*;
import java.awt.font.TextAttribute; import java.awt.font.TextAttribute;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.text.AttributedCharacterIterator; import java.text.AttributedCharacterIterator;
import java.util.*;
import java.util.List; import java.util.List;
import java.util.*;
import java.util.function.Function; import java.util.function.Function;
import java.util.function.Predicate; import java.util.function.Predicate;
import java.util.logging.Level; import java.util.logging.Level;
import java.util.logging.Logger; import java.util.logging.Logger;
import java.util.stream.Collectors; 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 Konstantin Bulenkov
* @author Jannis Weis * @author Jannis Weis
@ -192,7 +191,7 @@ public final class PropertyLoader {
return (UIDefaults.ActiveValue) (def) -> parseObject(value); return (UIDefaults.ActiveValue) (def) -> parseObject(value);
} else if (key.toLowerCase().endsWith("font")) { } else if (key.toLowerCase().endsWith("font")) {
returnVal = parseFont(key, value, accumulator, currentDefaults); 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); returnVal = parseIcon(value, accumulator, currentDefaults, iconLoader);
} else if (key.endsWith("Size") || key.endsWith(".size")) { } else if (key.endsWith("Size") || key.endsWith(".size")) {
returnVal = parseSize(value); returnVal = parseSize(value);

Loading…
Cancel
Save