From e1391133d34b349db453c96c39acb8f37e6e80d4 Mon Sep 17 00:00:00 2001 From: Arnaud Roques Date: Thu, 18 Nov 2021 18:12:17 +0100 Subject: [PATCH] Fix styles issues for theme and patch hacker theme --- src/net/sourceforge/plantuml/SkinParam.java | 6 +-- .../style/CommandStyleMultilinesCSS.java | 2 + .../sourceforge/plantuml/version/Version.java | 2 +- themes/puml-theme-hacker.puml | 41 +++---------------- themes/puml-theme-hacker.puml-hold | 36 ---------------- 5 files changed, 10 insertions(+), 77 deletions(-) delete mode 100644 themes/puml-theme-hacker.puml-hold diff --git a/src/net/sourceforge/plantuml/SkinParam.java b/src/net/sourceforge/plantuml/SkinParam.java index aa972456c..c77b4e5e6 100644 --- a/src/net/sourceforge/plantuml/SkinParam.java +++ b/src/net/sourceforge/plantuml/SkinParam.java @@ -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 ent : paramsPendingForStyleMigration.entrySet()) { final FromSkinparamToStyle convertor = new FromSkinparamToStyle(ent.getKey(), ent.getValue(), getCurrentStyleBuilder()); diff --git a/src/net/sourceforge/plantuml/style/CommandStyleMultilinesCSS.java b/src/net/sourceforge/plantuml/style/CommandStyleMultilinesCSS.java index ed93cec06..f98e73738 100644 --- a/src/net/sourceforge/plantuml/style/CommandStyleMultilinesCSS.java +++ b/src/net/sourceforge/plantuml/style/CommandStyleMultilinesCSS.java @@ -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 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(); diff --git a/src/net/sourceforge/plantuml/version/Version.java b/src/net/sourceforge/plantuml/version/Version.java index c9c6bfab9..886ca4bd3 100644 --- a/src/net/sourceforge/plantuml/version/Version.java +++ b/src/net/sourceforge/plantuml/version/Version.java @@ -80,7 +80,7 @@ public class Version { } public static int beta() { - final int beta = 4; + final int beta = 5; return beta; } diff --git a/themes/puml-theme-hacker.puml b/themes/puml-theme-hacker.puml index d7afd40ec..77e2c24bb 100644 --- a/themes/puml-theme-hacker.puml +++ b/themes/puml-theme-hacker.puml @@ -527,14 +527,12 @@ skinparam stack { } !endsub -!if %variable_exists("NEWSTYLE") - -!endif diff --git a/themes/puml-theme-hacker.puml-hold b/themes/puml-theme-hacker.puml-hold deleted file mode 100644 index 6c6c03f15..000000000 --- a/themes/puml-theme-hacker.puml-hold +++ /dev/null @@ -1,36 +0,0 @@ - -skinparam { -defaultTextAlignment center -shadowing false -RoundCorner 10 -TitleFontSize 18 -TitleFontColor #eaeaea -BackgroundColor transparent -} - \ No newline at end of file