mirror of
https://github.com/octoleo/plantuml.git
synced 2025-01-02 22:50:20 +00:00
Improve hyperlink color management
This commit is contained in:
parent
1fbe080683
commit
9ee6179c3a
@ -103,9 +103,9 @@ public class FontConfiguration {
|
|||||||
return useUnderlineForHyperlink;
|
return useUnderlineForHyperlink;
|
||||||
}
|
}
|
||||||
|
|
||||||
public final HColor getHyperlinkColor() {
|
// public final HColor getHyperlinkColor() {
|
||||||
return hyperlinkColor;
|
// return hyperlinkColor;
|
||||||
}
|
// }
|
||||||
|
|
||||||
// ---
|
// ---
|
||||||
|
|
||||||
@ -170,8 +170,11 @@ public class FontConfiguration {
|
|||||||
fontPosition, svgAttributes, true, hyperlinkColor, useUnderlineForHyperlink, tabSize);
|
fontPosition, svgAttributes, true, hyperlinkColor, useUnderlineForHyperlink, tabSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
public FontConfiguration changeColor(HColor htmlColor) {
|
public FontConfiguration changeColor(HColor newHtmlColor) {
|
||||||
return new FontConfiguration(styles, motherFont, motherColor, currentFont, htmlColor, extendedColor,
|
if (hyperlink)
|
||||||
|
return new FontConfiguration(styles, motherFont, motherColor, currentFont, currentColor, extendedColor,
|
||||||
|
fontPosition, svgAttributes, hyperlink, newHtmlColor, useUnderlineForHyperlink, tabSize);
|
||||||
|
return new FontConfiguration(styles, motherFont, motherColor, currentFont, newHtmlColor, extendedColor,
|
||||||
fontPosition, svgAttributes, hyperlink, hyperlinkColor, useUnderlineForHyperlink, tabSize);
|
fontPosition, svgAttributes, hyperlink, hyperlinkColor, useUnderlineForHyperlink, tabSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -106,6 +106,8 @@ public class EntityImageNote extends AbstractEntityImage implements Stencil {
|
|||||||
|
|
||||||
final Rose rose = new Rose();
|
final Rose rose = new Rose();
|
||||||
|
|
||||||
|
final FontConfiguration fontConfiguration;
|
||||||
|
final HorizontalAlignment horizontalAlignment;
|
||||||
if (UseStyle.useBetaStyle()) {
|
if (UseStyle.useBetaStyle()) {
|
||||||
final Style style = getDefaultStyleDefinition(umlDiagramType.getStyleName())
|
final Style style = getDefaultStyleDefinition(umlDiagramType.getStyleName())
|
||||||
.getMergedStyle(skinParam.getCurrentStyleBuilder());
|
.getMergedStyle(skinParam.getCurrentStyleBuilder());
|
||||||
@ -118,6 +120,9 @@ public class EntityImageNote extends AbstractEntityImage implements Stencil {
|
|||||||
this.borderColor = style.value(PName.LineColor).asColor(skinParam.getThemeStyle(),
|
this.borderColor = style.value(PName.LineColor).asColor(skinParam.getThemeStyle(),
|
||||||
skinParam.getIHtmlColorSet());
|
skinParam.getIHtmlColorSet());
|
||||||
this.shadowing = style.value(PName.Shadowing).asDouble();
|
this.shadowing = style.value(PName.Shadowing).asDouble();
|
||||||
|
|
||||||
|
fontConfiguration = style.getFontConfiguration(skinParam.getThemeStyle(), skinParam.getIHtmlColorSet());
|
||||||
|
horizontalAlignment = style.getHorizontalAlignment();
|
||||||
} else {
|
} else {
|
||||||
this.shadowing = skinParam.shadowing(getEntity().getStereotype()) ? 4 : 0;
|
this.shadowing = skinParam.shadowing(getEntity().getStereotype()) ? 4 : 0;
|
||||||
if (entity.getColors(getSkinParam()).getColor(ColorType.BACK) == null) {
|
if (entity.getColors(getSkinParam()).getColor(ColorType.BACK) == null) {
|
||||||
@ -126,16 +131,16 @@ public class EntityImageNote extends AbstractEntityImage implements Stencil {
|
|||||||
this.noteBackgroundColor = entity.getColors(getSkinParam()).getColor(ColorType.BACK);
|
this.noteBackgroundColor = entity.getColors(getSkinParam()).getColor(ColorType.BACK);
|
||||||
}
|
}
|
||||||
this.borderColor = SkinParamUtils.getColor(getSkinParam(), null, ColorParam.noteBorder);
|
this.borderColor = SkinParamUtils.getColor(getSkinParam(), null, ColorParam.noteBorder);
|
||||||
|
|
||||||
|
fontConfiguration = new FontConfiguration(getSkinParam(), FontParam.NOTE, null);
|
||||||
|
horizontalAlignment = skinParam.getHorizontalAlignment(AlignmentParam.noteTextAlignment, null, false, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strings.size() == 1 && strings.get(0).length() == 0) {
|
if (strings.size() == 1 && strings.get(0).length() == 0) {
|
||||||
textBlock = new TextBlockEmpty();
|
textBlock = new TextBlockEmpty();
|
||||||
} else {
|
} else {
|
||||||
final FontConfiguration fc = new FontConfiguration(getSkinParam(), FontParam.NOTE, null);
|
textBlock = BodyFactory.create3(strings, FontParam.NOTE, getSkinParam(), horizontalAlignment,
|
||||||
final HorizontalAlignment align = skinParam.getHorizontalAlignment(AlignmentParam.noteTextAlignment, null,
|
fontConfiguration, getSkinParam().wrapWidth());
|
||||||
false, null);
|
|
||||||
textBlock = BodyFactory.create3(strings, FontParam.NOTE, getSkinParam(), align, fc,
|
|
||||||
getSkinParam().wrapWidth());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ public class Version {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static int beta() {
|
public static int beta() {
|
||||||
final int beta = 5;
|
final int beta = 6;
|
||||||
return beta;
|
return beta;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user