Skip to content

Commit

Permalink
plantuml-stdlib#349 $baseShape="label" uses correct color
Browse files Browse the repository at this point in the history
  • Loading branch information
kirchsth committed May 4, 2024
1 parent 3248577 commit 8b2b11c
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 26 deletions.
13 changes: 13 additions & 0 deletions C4.puml
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,19 @@ skinparam package {
!$tagSkin = $tagSkin + $elementTagSkinparams("interface", $tagStereo, $bgColor, $bgColor, $borderColor, $shadowing, "", $borderStyle, $borderThickness)
' label uses wrong font color? (should be $bgColor too)
!$tagSkin = $tagSkin + $elementTagSkinparams("label", $tagStereo, $bgColor, $bgColor, $borderColor, $shadowing, "", $borderStyle, $borderThickness)
' label colors cannot be set via skinparam use additional style
!$tagSkin = $tagSkin + "<style>" + %newline()
' componentDiagram {
!$tagSkin = $tagSkin + " label {" + %newline()
!$tagSkin = $tagSkin + " ." + $tagStereo + " {" + %newline()
!$tagSkin = $tagSkin + " StereotypeFontColor " + $bgColor + %newline()
!$tagSkin = $tagSkin + " Fontcolor " + $bgColor + %newline()
!$tagSkin = $tagSkin + " BackgroundColor " + $bgColor + %newline()
!$tagSkin = $tagSkin + " BorderColor " + $borderColor + %newline()
!$tagSkin = $tagSkin + " }" + %newline()
!$tagSkin = $tagSkin + " }" + %newline()
' }
!$tagSkin = $tagSkin + "</style>" + %newline()
!endif
$tagSkin
!endprocedure
Expand Down
2 changes: 1 addition & 1 deletion LayoutOptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -721,14 +721,14 @@ SHOW_LEGEND()
| frame | &#x2611; | requires ENABLE_ALL_PLANT_ELEMENTS |
| hexagon | &#x2611; | requires ENABLE_ALL_PLANT_ELEMENTS |
| interface | &#x2611; | requires ENABLE_ALL_PLANT_ELEMENTS |
| label | &#x2611; | requires ENABLE_ALL_PLANT_ELEMENTS |
| package | &#x2611; | requires ENABLE_ALL_PLANT_ELEMENTS |
| stack | &#x2611; | requires ENABLE_ALL_PLANT_ELEMENTS |
| storage | &#x2611; | requires ENABLE_ALL_PLANT_ELEMENTS |
| usecase | &#x2611; | requires ENABLE_ALL_PLANT_ELEMENTS |
| usecase/ | &#x2611; | requires ENABLE_ALL_PLANT_ELEMENTS |
| | | |
| actor/ | &#x274C; | requires ENABLE_ALL_PLANT_ELEMENTS, not working (font color not changed to $bkColor) - and/or conflict with existing? |
| label | &#x274C; | requires ENABLE_ALL_PLANT_ELEMENTS, not working (font color not changed to $bkColor) |

If `ENABLE_ALL_PLANT_ELEMENTS` is not set, the diagrams displays the requested "PlantUML element"
but the style is not correct.
50 changes: 25 additions & 25 deletions percy/TestAllPlantUmlElements.puml
Original file line number Diff line number Diff line change
Expand Up @@ -83,30 +83,30 @@ Container(storageContainer, "Container storage", "storage", "A Container with st
Container(usecaseContainer, "Container usecase", "usecase", "A Container with usecase element", $baseShape="usecase")
Container(usecaseBCContainer, "Container usecase/", "usecase/", "A Container with usecase/ element", $baseShape="usecase/")

System(actorSystem, "System actor", "actor", "A System with actor element", $baseShape="actor")
System(actorBCSystem, "System actor/", "actor/", "A System with actor/ element", $baseShape="actor/")
System(agentSystem, "System agent", "agent", "A System with agent element", $baseShape="agent")
System(artifactSystem, "System artifact", "artifact", "A System with artifact element", $baseShape="artifact")
System(boundarySystem, "System boundary", "boundary", "A System with boundary element", $baseShape="boundary")
System(cardSystem, "System card", "card", "A System with card element", $baseShape="card")
System(circleSystem, "System circle", "circle", "A System with circle element", $baseShape="circle")
System(cloudSystem, "System cloud", "cloud", "A System with cloud element", $baseShape="cloud")
System(collectionsSystem, "System collections", "collections", "A System with collections element", $baseShape="collections")
System(controlSystem, "System control", "control", "A System with control element", $baseShape="control")
System(entitySystem, "System entity", "entity", "A System with entity element", $baseShape="entity")
System(fileSystem, "System file", "file", "A System with file element", $baseShape="file")
System(folderSystem, "System folder", "folder", "A System with folder element", $baseShape="folder")
System(frameSystem, "System frame", "frame", "A System with frame element", $baseShape="frame")
System(hexagonSystem, "System hexagon", "hexagon", "A System with hexagon element", $baseShape="hexagon")
System(interfaceSystem, "System interface", "interface", "A System with interface element", $baseShape="interface")
System(labelSystem, "System label", "label", "A System with label element", $baseShape="label")
System(nodeSystem, "System node", "node", "A System with node element", $baseShape="node")
System(packageSystem, "System package", "package", "A System with package element", $baseShape="package")
System(personSystem, "System person", "person", "A System with person element", $baseShape="person")
System(stackSystem, "System stack", "stack", "A System with stack element", $baseShape="stack")
System(storageSystem, "System storage", "storage", "A System with storage element", $baseShape="storage")
System(usecaseSystem, "System usecase", "usecase", "A System with usecase element", $baseShape="usecase")
System(usecaseBCSystem, "System usecase/", "usecase/", "A System with usecase/ element", $baseShape="usecase/")
System(actorSystem, "System actor", $type="actor", "A System with actor element", $baseShape="actor")
System(actorBCSystem, "System actor/", $type="actor/", "A System with actor/ element", $baseShape="actor/")
System(agentSystem, "System agent", $type="agent", "A System with agent element", $baseShape="agent")
System(artifactSystem, "System artifact", $type="artifact", "A System with artifact element", $baseShape="artifact")
System(boundarySystem, "System boundary", $type="boundary", "A System with boundary element", $baseShape="boundary")
System(cardSystem, "System card", $type="card", "A System with card element", $baseShape="card")
System(circleSystem, "System circle", $type="circle", "A System with circle element", $baseShape="circle")
System(cloudSystem, "System cloud", $type="cloud", "A System with cloud element", $baseShape="cloud")
System(collectionsSystem, "System collections", $type="collections", "A System with collections element", $baseShape="collections")
System(controlSystem, "System control", $type="control", "A System with control element", $baseShape="control")
System(entitySystem, "System entity", $type="entity", "A System with entity element", $baseShape="entity")
System(fileSystem, "System file", $type="file", "A System with file element", $baseShape="file")
System(folderSystem, "System folder", $type="folder", "A System with folder element", $baseShape="folder")
System(frameSystem, "System frame", $type="frame", "A System with frame element", $baseShape="frame")
System(hexagonSystem, "System hexagon", $type="hexagon", "A System with hexagon element", $baseShape="hexagon")
System(interfaceSystem, "System interface", $type="interface", "A System with interface element", $baseShape="interface")
System(labelSystem, "System label", $type="label", "A System with label element", $baseShape="label")
System(nodeSystem, "System node", $type="node", "A System with node element", $baseShape="node")
System(packageSystem, "System package", $type="package", "A System with package element", $baseShape="package")
System(personSystem, "System person", $type="person", "A System with person element", $baseShape="person")
System(stackSystem, "System stack", $type="stack", "A System with stack element", $baseShape="stack")
System(storageSystem, "System storage", $type="storage", "A System with storage element", $baseShape="storage")
System(usecaseSystem, "System usecase", $type="usecase", "A System with usecase element", $baseShape="usecase")
System(usecaseBCSystem, "System usecase/", $type="usecase/", "A System with usecase/ element", $baseShape="usecase/")

SHOW_LEGEND()
SHOW_LEGEND(false)
@enduml

0 comments on commit 8b2b11c

Please sign in to comment.