From 3f6e0c936b195e4911be9371b86456122d24654a Mon Sep 17 00:00:00 2001 From: Ross Churchley Date: Sun, 21 Feb 2016 21:57:37 -0800 Subject: [PATCH] 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. --- doc/metropolistheme.dtx | 3 --- source/beamerthememetropolis.dtx | 13 ++++++++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/doc/metropolistheme.dtx b/doc/metropolistheme.dtx index 9a63639..fb804a4 100644 --- a/doc/metropolistheme.dtx +++ b/doc/metropolistheme.dtx @@ -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|. diff --git a/source/beamerthememetropolis.dtx b/source/beamerthememetropolis.dtx index db204cc..7df52c6 100644 --- a/source/beamerthememetropolis.dtx +++ b/source/beamerthememetropolis.dtx @@ -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}