diff --git a/src/net/sourceforge/plantuml/style/FromSkinparamToStyle.java b/src/net/sourceforge/plantuml/style/FromSkinparamToStyle.java index 70ecd4fd0..c32b6ed82 100644 --- a/src/net/sourceforge/plantuml/style/FromSkinparamToStyle.java +++ b/src/net/sourceforge/plantuml/style/FromSkinparamToStyle.java @@ -83,8 +83,8 @@ public class FromSkinparamToStyle { addMagic(SName.database); addMagic(SName.entity); - addConFont("header", SName.header); - addConFont("footer", SName.footer); + addConFont("header", SName.document, SName.header); + addConFont("footer", SName.document, SName.footer); addConvert("defaultFontSize", PName.FontSize, SName.element); @@ -172,11 +172,12 @@ public class FromSkinparamToStyle { addConvert("BackgroundColor", PName.BackGroundColor, SName.document); - addConvert("classBackgroundColor", PName.BackGroundColor, SName.class_); - addConvert("classBorderColor", PName.LineColor, SName.class_); - addConFont("class", SName.class_); - addConFont("classAttribute", SName.class_); - addConvert("classBorderThickness", PName.LineThickness, SName.class_); + addConvert("classBackgroundColor", PName.BackGroundColor, SName.element, SName.class_); + addConvert("classBorderColor", PName.LineColor, SName.element, SName.class_); + addConFont("class", SName.element, SName.class_); + addConFont("classAttribute", SName.element, SName.class_); + addConvert("classBorderThickness", PName.LineThickness, SName.element, SName.class_); + addConvert("classHeaderBackgroundColor", PName.BackGroundColor, SName.element, SName.class_, SName.header); addConvert("objectBackgroundColor", PName.BackGroundColor, SName.object); addConvert("objectBorderColor", PName.LineColor, SName.object); diff --git a/src/net/sourceforge/plantuml/svek/image/EntityImageClass.java b/src/net/sourceforge/plantuml/svek/image/EntityImageClass.java index 778c3ac6a..88f94b501 100644 --- a/src/net/sourceforge/plantuml/svek/image/EntityImageClass.java +++ b/src/net/sourceforge/plantuml/svek/image/EntityImageClass.java @@ -156,6 +156,13 @@ public class EntityImageClass extends AbstractEntityImage implements Stencil, Wi .getMergedStyle(getSkinParam().getCurrentStyleBuilder()); } + private Style getStyleHeader() { + return StyleSignatureBasic.of(SName.root, SName.element, SName.classDiagram, SName.class_, SName.header) // + .withTOBECHANGED(getEntity().getStereotype()) // + .with(getEntity().getStereostyles()) // + .getMergedStyle(getSkinParam().getCurrentStyleBuilder()); + } + private void drawInternal(UGraphic ug) { final StringBounder stringBounder = ug.getStringBounder(); final Dimension2D dimTotal = calculateDimension(stringBounder); @@ -179,13 +186,14 @@ public class EntityImageClass extends AbstractEntityImage implements Stencil, Wi classBorder = getStyle().value(PName.LineColor).asColor(getSkinParam().getThemeStyle(), getSkinParam().getIHtmlColorSet()); + if (headerBackcolor == null) + headerBackcolor = backcolor == null ? getStyleHeader().value(PName.BackGroundColor) + .asColor(getSkinParam().getThemeStyle(), getSkinParam().getIHtmlColorSet()) : backcolor; + if (backcolor == null) backcolor = getStyle().value(PName.BackGroundColor).asColor(getSkinParam().getThemeStyle(), getSkinParam().getIHtmlColorSet()); - if (headerBackcolor == null) - headerBackcolor = backcolor; - } else { if (getSkinParam().shadowing(getEntity().getStereotype())) shadow = 4;