I'm trying to create a beamer theme that has some colored boxes at the very top and bottom of each slide. So far, I have copied the default theme and added an empty beamercolorbox to it. While this works, I get a while line between the border line and the subsequent header box. Where does this line come from and how do I get rid of it?
\documentclass{beamer}
\usetheme{default}
\makeatletter
\setbeamercolor{top/bottom bar}{fg=red,bg=red}
\setbeamercolor{titlelike}{parent=structure,fg=black,bg=green}
\setbeamertemplate{frametitle}
{
\ifbeamercolorempty[bg]{frametitle}{}{\nointerlineskip}%
\@tempdima=\textwidth%
\advance\@tempdima by\beamer@leftmargin%
\advance\@tempdima by\beamer@rightmargin%
\begin{beamercolorbox}[ht=1.26mm,dp=0mm,wd=\the\@tempdima,colsep=0mm]{top/bottom bar}% <-- INSERTED THIS
\end{beamercolorbox}% <-- INSERTED THIS
\begin{beamercolorbox}[sep=0.3cm,1,wd=\the\@tempdima]{frametitle}
\usebeamerfont{frametitle}%
\vbox{}\vskip-1ex%
\if@tempswa\else\csname beamer@fte1\endcsname\fi%
\strut\insertframetitle\strut\par%
{%
\ifx\insertframesubtitle\@empty%
\else%
{\usebeamerfont{framesubtitle}\usebeamercolor[fg]{framesubtitle}\insertframesubtitle\strut\par}%
\fi
}%
\vskip-1ex%
\if@tempswa\else\vskip-.3cm\fi% set inside beamercolorbox... evil here...
\end{beamercolorbox}%
}
\makeatother
\begin{document}
\begin{frame}
\frametitle{Foo Bar}
\begin{itemize}
\item Foo
\item Bar
\item Baz
\end{itemize}
\end{frame}
\end{document}
