Browse Source

adjusted warning message.

pull/170/head
weisj 5 years ago
parent
commit
909ea32f22
  1. 13
      property-loader/src/main/java/com/github/weisj/darklaf/icons/IconColorMapper.java

13
property-loader/src/main/java/com/github/weisj/darklaf/icons/IconColorMapper.java

@ -87,16 +87,16 @@ public final class IconColorMapper {
} }
} }
private static Color resolveColor(final String key, final String[] fallbacks, final Color fallbackColor, private static Color resolveColor(final String key, final String[] fallbacks,
final UIDefaults defaults) { final Color fallbackColor, final UIDefaults defaults) {
Color color = defaults.getColor(key); Color color = defaults.getColor(key);
for (int i = 0; i < fallbacks.length && color == null; i++) { for (int i = 0; i < fallbacks.length && color == null; i++) {
color = defaults.getColor(fallbacks[i]); color = defaults.getColor(fallbacks[i]);
} }
if (color == null) { if (color == null) {
color = fallbackColor; color = fallbackColor;
LOGGER.warning("Could not load color with id'" + key + "' fallbacks" + Arrays.toString(fallbacks) LOGGER.warning("Could not load color with id '" + key + "' fallbacks" + Arrays.toString(fallbacks)
+ " Using color " + fallbackColor + " instead."); + ". Using color '" + fallbackColor + "' instead.");
} }
return color; return color;
} }
@ -129,8 +129,9 @@ public final class IconColorMapper {
return 1; return 1;
} }
private static Pair<LinearGradient, Runnable> createColor(final Color c, final String name, final float opacity) private static Pair<LinearGradient, Runnable> createColor(final Color c,
throws SVGElementException { final String name,
final float opacity) throws SVGElementException {
LinearGradient grad = new LinearGradient(); LinearGradient grad = new LinearGradient();
grad.addAttribute("id", AnimationElement.AT_XML, name); grad.addAttribute("id", AnimationElement.AT_XML, name);
return new Pair<>(grad, () -> { return new Pair<>(grad, () -> {

Loading…
Cancel
Save