mirror of https://github.com/matze/mtheme.git
Fix known issue with beamercolortheme fly
Previously `\plain` slides were broken if the user overrode the colour theme with `fly`, as that theme does not define a background colour for `palette primary`. The solution checks whether `palette primary.bg` is undefined; if so, it automatically picks a colour complementary to `palette primary.fg` for the background of the plain slides.
This commit is contained in:
parent
653826403e
commit
3f6e0c936b
|
@ -523,9 +523,6 @@ only alphabetic characters and do not require the expansion of any macros.
|
|||
|
||||
|
||||
|
||||
\subsection{Plain Frame}
|
||||
The |\plain| command does not work if you override the \themename color theme
|
||||
with the default beamer color theme |fly|.
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -177,9 +177,16 @@
|
|||
\def\metropolis@plaintitleformat#1{#1}
|
||||
\newcommand{\plain}[2][]{%
|
||||
\begingroup
|
||||
\setbeamercolor{background canvas}{
|
||||
use=palette primary,
|
||||
parent=palette primary
|
||||
\ifbeamercolorempty[bg]{palette primary}{
|
||||
\setbeamercolor{background canvas}{
|
||||
use=palette primary,
|
||||
bg=-palette primary.fg
|
||||
}
|
||||
}{
|
||||
\setbeamercolor{background canvas}{
|
||||
use=palette primary,
|
||||
bg=palette primary.bg
|
||||
}
|
||||
}
|
||||
\begin{frame}[c]{#1}
|
||||
\begin{center}
|
||||
|
|
Loading…
Reference in New Issue