In order to fit an UML diagram made with TiKZ-UML (https://perso.ensta-paris.fr/~kielbasi/tikzuml/) into a beamer slide, I am currently trying to shrink the body part of the components. Unfortunately, I did not find a way to do so.
My code looks like this:
\documentclass[aspectratio=169]{beamer}
\usepackage{tikz}
\usepackage{tikz-uml}
\usepackage{parts/umldocument}
\usepackage{parts/umlmultidocument}
\usepackage{parts/umlcomponent}
\begin{document}
\begin{frame}{Example UML Components}
\begin{tikzpicture}
\begin{umlcomponent}{A}
\hspace{-1cm}
\end{umlcomponent}
\umlbasiccomponent[x=3, minimum height=0pt] {B}
\umlbasiccomponent[x=6, inner ysep=0pt] {C}
\umlbasiccomponent[x=9, outer ysep=0pt] {D}
\end{tikzpicture}
\end{frame}
\end{document}
but this only creates the following output:
While setting inner ysep=0pt (from TikZ-UML: How to shrink lost space within classes?) reduces the size, it reduces the size of the overall component in a way that breaks its appearance. It is also possible to set inner ysep=-2pt, which further reduces the body, but it also reduces the header size.
Also adding
\tikzset{
tikzuml component style/.append style={minimum height=0pt,inner ysep=0pt,text depth=2pt}
}
has no effect.
Has anybody an idea how to shrink the size of the body of an tikz-uml component, without breaking its header part?

\node[every whatever node/.try, …and then use that style to set it from the outside. – Qrrbrbirlbel Sep 01 '22 at 11:00whatever nodeto edit (usingtikzuml component stylelike in the question did not work). – David Georg Reichelt Sep 01 '22 at 12:22\nodeat the end of the options and then you can (re)define that style outside and then TikZ would pick it up. If you use a key in the/tikzuml/componentnamespace you can define it in the optional argument of theumlcomponentenvironment and TikZ would pick it up. Say you change line 4754 so that it reads\node[…, /tikzuml/component/foo/.try] …;you should then be able to use\begin{umlcomponent}[foo/.style={fill=green}]. Or\pgfqkeys{/tikzuml/component/foo/.style=…}for a global approach. (Yes, I'd rewrite the class.) – Qrrbrbirlbel Sep 01 '22 at 13:06