Frame header font style

0 votes
asked Sep 15 in Question / help by rod_makin (180 points)

Sorry might be obvious but I cant see this in the documentation.

When I use the following

frame sw_package as SW2

The sw_package test is within the box and all is good

When I use

        frame sw_package as SW {

            file defect as df

        }

This has the file element within the frame and the header part of the frame now contains the sw_package label. How do I change the font within the header of the frame?

I use the following in an include file

skinparam frame {

BorderColor blue

BackgroundColor lightCyan

BorderThickness 1.0

ArrowThickness 0.5

FontName Arial Narrow

FontColor black

FontSize 11

FontStyle regular

}

1 Answer

0 votes
answered Sep 15 by The-Lu (49,760 points)

Hello R.,

A possible temporary workaround is to use (tricky or strange) title skinparam, as:

By Skinparam:

CodeOutput
skinparam frame {
BorderColor blue
BackgroundColor lightCyan
BorderThickness 1.0
ArrowThickness 0.5
FontName Arial Narrow
FontColor red
FontSize 11
FontStyle regular
}
skinparam title {
FontName Arial Narrow
FontColor red
FontSize 11
FontStyle regular
}
frame sw_package as SW {
  file defect as df
}

frame sw_package as SW2

By Style:

CodeOutput
<style>
frame {
  LineColor blue
  BackgroundColor lightCyan
  LineThickness 1.0
  ArrowThickness 0.5
  FontName Arial Narrow
  FontColor red
  FontSize 11
  FontStyle regular
}
title {
  FontName Arial Narrow
  FontColor red
  FontSize 11
  FontStyle regular
}
</style>

frame sw_package as SW {
  file defect as df
}

frame sw_package as SW2


See observation and question here:

@PlantUML team: this behaviour is tricky or strange...
What the future plan:
- to manage, much better, style header (and by style) for package, folder or frame...

If that can help,
Regards,
Th.

commented Sep 15 by plantuml (279,640 points)

> @PlantUML team: this behaviour is tricky or strange...
>
Yes, indeed. Sorry about that!

It's not working yet, but what about having:

@startuml
<style>
frame {
  FontColor red
  title {
    FontColor green
  }
}
file {
  FontColor blue
}
</style>
frame sw_package as SW {
  file defect as df
}
frame sw_package2 as SW2
@enduml

printing the following image:

Does it sound better?

commented Sep 15 by rod_makin (180 points)
That does help - thank you all very much. Whether its a workaround or not, its worked for me!! Thanks
commented Sep 15 by The-Lu (49,760 points)

Hello PlantUML team,

Yes:

<style>
frame {
  FontColor red
  title {
    FontColor green
  }
}
file {
  FontColor blue
}
</style>

is better than as on GH-1000:

<style>
frame {
  LineColor blue
  BackgroundColor lightCyan
  LineThickness 1.0
  ArrowThickness 0.5
  FontName Arial Narrow
  FontColor red
  FontSize 11
  FontStyle regular
}
element {
title {
  FontName Arial Narrow
  FontColor red
  FontSize 11
  FontStyle regular
}
}
</style>

title Title
frame sw_package as SW {
  file defect as df
}

frame sw_package as SW2

But:

  • Why not to use header name instead of title ?
    to debate...

Then:

  • How to change and style all the text header (of possible nested elements depending of diagram type [frame, folder, package, group, partition, rectangle, card, ...]) on all type of diagram (Deployment, Sequence, Activity, ...)? wink
    (to avoid to make confusion with `groupHeader`...)
    I must to go test....cheeky

Regards,
Th.

commented Sep 15 by The-Lu (49,760 points)
  • Why not to use header name instead of title ?
    to debate...

After reflection, title is a good name; especially to dissociate to group and groupHeader on Sequence diagram... wink

...