diff --git a/src/net/sourceforge/plantuml/SkinParam.java b/src/net/sourceforge/plantuml/SkinParam.java index 9a1f58f6b..637c0e72e 100644 --- a/src/net/sourceforge/plantuml/SkinParam.java +++ b/src/net/sourceforge/plantuml/SkinParam.java @@ -206,7 +206,8 @@ public class SkinParam implements ISkinParam { if (UseStyle.useBetaStyle()) { applyPendingStyleMigration(); - final FromSkinparamToStyle convertor = new FromSkinparamToStyle(key2, value, getCurrentStyleBuilder()); + final FromSkinparamToStyle convertor = new FromSkinparamToStyle(key2); + convertor.convertNow(value, getCurrentStyleBuilder()); for (Style style : convertor.getStyles()) muteStyle(style); } else { @@ -231,8 +232,8 @@ public class SkinParam implements ISkinParam { public void applyPendingStyleMigration() { for (Entry ent : paramsPendingForStyleMigration.entrySet()) { - final FromSkinparamToStyle convertor = new FromSkinparamToStyle(ent.getKey(), ent.getValue(), - getCurrentStyleBuilder()); + final FromSkinparamToStyle convertor = new FromSkinparamToStyle(ent.getKey()); + convertor.convertNow(ent.getValue(), getCurrentStyleBuilder()); for (Style style : convertor.getStyles()) muteStyle(style); } @@ -726,7 +727,7 @@ public class SkinParam implements ISkinParam { public ColorMapper getColorMapper() { if (themeStyle == ThemeStyle.DARK) return new ColorMapperForceDark(); - + final String monochrome = getValue("monochrome"); if ("true".equals(monochrome)) return new ColorMapperMonochrome(false); diff --git a/src/net/sourceforge/plantuml/style/FromSkinparamToStyle.java b/src/net/sourceforge/plantuml/style/FromSkinparamToStyle.java index 2d3b93e59..c6dd854f6 100644 --- a/src/net/sourceforge/plantuml/style/FromSkinparamToStyle.java +++ b/src/net/sourceforge/plantuml/style/FromSkinparamToStyle.java @@ -46,13 +46,27 @@ import java.util.StringTokenizer; public class FromSkinparamToStyle { static class Data { - final private PName propertyName; final private SName[] styleNames; + final private PName propertyName; - Data(PName propertyName, SName[] styleNames) { + Data(SName[] styleNames, PName propertyName) { this.propertyName = propertyName; this.styleNames = styleNames; } + + @Override + public String toString() { + final StringBuilder sb = new StringBuilder(); + sb.append("["); + for (SName s : styleNames) { + sb.append(s.toString()); + sb.append("."); + } + sb.setLength(sb.length() - 1); + sb.append("]"); + sb.append(propertyName.toString()); + return sb.toString(); + } } private static final Map> knowlegde = new HashMap>(); @@ -117,7 +131,7 @@ public class FromSkinparamToStyle { addConvert("activityStartColor", PName.BackGroundColor, SName.circle, SName.start); addConvert("activityEndColor", PName.LineColor, SName.circle, SName.end); addConvert("activityStopColor", PName.LineColor, SName.circle, SName.stop); - addConvert("activityBarColor", PName.LineColor, SName.activityBar); + addConvert("activityBarColor", PName.BackGroundColor, SName.activityBar); addConvert("activityBorderColor", PName.LineColor, SName.activity); addConvert("activityBorderThickness", PName.LineThickness, SName.activity); addConvert("activityBackgroundColor", PName.BackGroundColor, SName.activity); @@ -206,38 +220,70 @@ public class FromSkinparamToStyle { } private final List