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

View File

@ -35,6 +35,7 @@
*/
package net.sourceforge.plantuml.style;
import net.sourceforge.plantuml.SkinParam;
import net.sourceforge.plantuml.TitledDiagram;
import net.sourceforge.plantuml.UseStyle;
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)) {
diagram.getSkinParam().muteStyle(modifiedStyle);
}
((SkinParam) diagram.getSkinParam()).applyPendingStyleMigration();
return CommandExecutionResult.ok();
} catch (NoStyleAvailableException e) {
// e.printStackTrace();

View File

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

View File

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