I started using rather large Beamer-based template. Everything is good except title vertical align - for default font size it looks ok:
But when I change the fontsize to, e.g. 9pt like this:
\documentclass[lualatex,hyperref={pdfencoding=auto},9pt]{beamer}
The gets shifted upwards
As far as I found out, the vertical alignment is set up with this code:
\setbeamertemplate{frametitle}
{
\nointerlineskip
\begin{beamercolorbox}[sep=0.3cm,ht=1.8em,wd=\paperwidth]{frametitle}
\vbox{}\vskip-2ex
\strut\insertframetitle\strut
\hfill
\raisebox{-0.25\height}{\includegraphics[height=1.35em]{\proj@TightSignFileName}}
\vskip-0.8ex%
\end{beamercolorbox}
}
Is there any way, how to do the vertical alignment "dynamically", so that the whole title would be positioned in the middle, no matter the font size?
I've tried valign from adjustbox package as mentioned in How to vertically center text with an image in the same row of a table , but it doesn't seem to work really well in this case:
\setbeamertemplate{frametitle}
{
\nointerlineskip
\begin{beamercolorbox}[sep=0.3cm,ht=1.8em,wd=\paperwidth]{frametitle}
\vbox{}\vskip-2ex
\strut\insertframetitle\strut
\hfill
\includegraphics[valign=m,height=1.35em]{\vsb@TightSignFileName}
\vskip-0.8ex%
\end{beamercolorbox}
}
Download link
Due to the large number of necessary files and images I uploaded complete MWE onto this link:


