new frame title struts

This commit is contained in:
Benjamin Weiss 2016-02-26 19:31:25 +01:00
parent 1b0699893d
commit 122e9f48ba
1 changed files with 19 additions and 4 deletions

View File

@ -154,16 +154,31 @@
% Templates for the frame title, which is optionally underlined with a % Templates for the frame title, which is optionally underlined with a
% progress bar. % progress bar.
% \begin{macrocode} % \begin{macrocode}
\newcommand{\metropolis@frametitlestrut}{ \newlength{\metropolis@frametitle@padding}
\vphantom{ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz()}% \setlength{\metropolis@frametitle@padding}{1.5ex}
\newcommand{\metropolis@frametitlestrut@start}{
\rule{0pt}{\metropolis@frametitle@padding +%
\totalheightof{%
\ifcsname metropolis@frametitleformat\endcsname%
\metropolis@frametitleformat X%
\else%
X%
\fi%
}%
}%
}
\newcommand{\metropolis@frametitlestrut@end}{
\rule[-\metropolis@frametitle@padding]{0pt}{\metropolis@frametitle@padding}
} }
\defbeamertemplate{frametitle}{plain}{% \defbeamertemplate{frametitle}{plain}{%
\nointerlineskip% \nointerlineskip%
\begin{beamercolorbox}[% \begin{beamercolorbox}[%
wd=\paperwidth,% wd=\paperwidth,%
sep=1.5ex,% sep=0pt,%
leftskip=\metropolis@frametitle@padding,%
rightskip=\metropolis@frametitle@padding,%
]{frametitle}% ]{frametitle}%
\metropolis@frametitlestrut\insertframetitle\metropolis@frametitlestrut% \metropolis@frametitlestrut@start\insertframetitle\metropolis@frametitlestrut@end%
\end{beamercolorbox}% \end{beamercolorbox}%
} }
% \end{macrocode} % \end{macrocode}