Use `pgfmathsetlength`, and max progress bars out at 1

Fixes #274 for frame
This commit is contained in:
Erich Schubert 2018-09-13 16:59:55 +02:00 committed by GitHub
parent 2fa6084b9d
commit 0b07c510c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 3 deletions

View File

@ -191,9 +191,7 @@
\setlength{\metropolis@progressinheadfoot@linewidth}{0.4pt}
\setbeamertemplate{progress bar in head/foot}{
\nointerlineskip
\setlength{\metropolis@progressinheadfoot}{%
\paperwidth * \ratio{\insertframenumber pt}{\inserttotalframenumber pt}%
}%
\pgfmathsetlength{\metropolis@progressinheadfoot}{\paperwidth * min(1,\insertframenumber/\inserttotalframenumber}
\begin{beamercolorbox}[wd=\paperwidth]{progress bar in head/foot}
\tikzexternaldisable%
\begin{tikzpicture}