[Tex/LaTex] How to center the titleframe in Hannover theme (beamer)

beamermacrostitles

I am using the Hannover theme in beamer and I am using the title frame as plain

\documentclass{beamer}
\mode<presentation>
{
  \usetheme{Hannover}%{CambridgeUS}%
  \setbeamercovered{transparent}
}

\title[Title]{Centering Title frame}
\author[Gopi]{Gopi}

\begin{document}
\begin{frame}[plain]
    \titlepage
    \begin{figure}
    \begin{center}
        \includegraphics[scale=0.3]{logo}
    \end{center}
    \end{figure}
\end{frame}
\end{document}

picture of frame title not centered
picture of frame title without "plain" not centered

Because it was not obvious on the first picture (white on white, I have added the same picture without the option "plain" on the frame). My point is that I would like that with the option plain the frame forget about the hannover theme and centers the whole frame.

I tried to put a \hspace{-xpt} before the frame but it did not seem to work.

Best Answer

You could \hoffset to move the content of the frame to the left, by the half amount of the sidebar width:

\begingroup
\makeatletter
\setlength{\hoffset}{-.5\beamer@sidebarwidth}
\makeatother
\begin{frame}[plain]
    \titlepage
    ...
\end{frame}
\endgroup

I used \begingroupand \endgroup to limit the effect of the change to \hoffset to just this frame. \makeatletter and \makeatletter are necessary for accessing the internal macro \beamer@sidebarwidth.