Fix styles issues for theme and patch hacker theme

This commit is contained in:
Arnaud Roques 2021-11-18 18:12:17 +01:00
parent df4c58995c
commit e1391133d3
5 changed files with 10 additions and 77 deletions

View File

@ -148,9 +148,8 @@ public class SkinParam implements ISkinParam {
} }
public void muteStyle(Style modifiedStyle) { public void muteStyle(Style modifiedStyle) {
if (UseStyle.useBetaStyle()) { if (UseStyle.useBetaStyle())
styleBuilder = getCurrentStyleBuilder().muteStyle(modifiedStyle); styleBuilder = getCurrentStyleBuilder().muteStyle(modifiedStyle);
}
} }
public String getDefaultSkin() { public String getDefaultSkin() {
@ -167,7 +166,6 @@ public class SkinParam implements ISkinParam {
if (result == null) { if (result == null) {
result = tmp.loadSkin("plantuml.skin"); result = tmp.loadSkin("plantuml.skin");
} }
return result; return result;
} }
@ -225,7 +223,7 @@ public class SkinParam implements ISkinParam {
} }
} }
private void applyPendingStyleMigration() { public void applyPendingStyleMigration() {
for (Entry<String, String> ent : paramsPendingForStyleMigration.entrySet()) { for (Entry<String, String> ent : paramsPendingForStyleMigration.entrySet()) {
final FromSkinparamToStyle convertor = new FromSkinparamToStyle(ent.getKey(), ent.getValue(), final FromSkinparamToStyle convertor = new FromSkinparamToStyle(ent.getKey(), ent.getValue(),
getCurrentStyleBuilder()); getCurrentStyleBuilder());

View File

@ -35,6 +35,7 @@
*/ */
package net.sourceforge.plantuml.style; package net.sourceforge.plantuml.style;
import net.sourceforge.plantuml.SkinParam;
import net.sourceforge.plantuml.TitledDiagram; import net.sourceforge.plantuml.TitledDiagram;
import net.sourceforge.plantuml.UseStyle; import net.sourceforge.plantuml.UseStyle;
import net.sourceforge.plantuml.command.BlocLines; import net.sourceforge.plantuml.command.BlocLines;
@ -73,6 +74,7 @@ public class CommandStyleMultilinesCSS extends CommandMultilines2<TitledDiagram>
for (Style modifiedStyle : StyleLoader.getDeclaredStyles(lines.subExtract(1, 1), styleBuilder)) { for (Style modifiedStyle : StyleLoader.getDeclaredStyles(lines.subExtract(1, 1), styleBuilder)) {
diagram.getSkinParam().muteStyle(modifiedStyle); diagram.getSkinParam().muteStyle(modifiedStyle);
} }
((SkinParam) diagram.getSkinParam()).applyPendingStyleMigration();
return CommandExecutionResult.ok(); return CommandExecutionResult.ok();
} catch (NoStyleAvailableException e) { } catch (NoStyleAvailableException e) {
// e.printStackTrace(); // e.printStackTrace();

View File

@ -80,7 +80,7 @@ public class Version {
} }
public static int beta() { public static int beta() {
final int beta = 4; final int beta = 5;
return beta; return beta;
} }

View File

@ -527,14 +527,12 @@ skinparam stack {
} }
!endsub !endsub
!if %variable_exists("NEWSTYLE")
<style> <style>
wbsDiagram { mindmapDiagram, wbsDiagram {
LineColor $PRIMARY element {
BorderThickness 3 $primary_scheme()
BackgroundColor $LIGHT-black }
FontColor $PRIMARY :depth(0) {
:depth(0) {
fontSize 16 fontSize 16
fontStyle bold fontStyle bold
fontColor $SECONDARY fontColor $SECONDARY
@ -557,33 +555,4 @@ wbsDiagram {
} }
</style> </style>
<style>
mindmapDiagram {
LineColor $PRIMARY
BorderThickness 3
BackgroundColor $LIGHT-black
FontColor $PRIMARY
:depth(0) {
fontSize 16
fontStyle bold
fontColor $SECONDARY
}
:depth(1) {
fontSize 14
padding 5
fontStyle bold
}
:depth(2) {
fontSize 12
padding 4
}
:depth(3) {
fontSize 11
padding 3
fontColor $INFO
}
}
</style>
!endif

View File

@ -1,36 +0,0 @@
skinparam {
defaultTextAlignment center
shadowing false
RoundCorner 10
TitleFontSize 18
TitleFontColor #eaeaea
BackgroundColor transparent
}
<style>
wbsDiagram {
LineColor #b5e853
BorderThickness 3
BackgroundColor #151515
FontColor #eaeaea
:depth(0) {
fontSize 16
fontStyle bold
fontColor #6a9fb5
}
:depth(1) {
fontSize 14
padding 5
fontStyle bold
}
:depth(2) {
fontSize 12
padding 3
}
:depth(3) {
fontSize 10
padding 2
}
}
</style>