Debian Codegraph @

texmf-dist/tex/latex/beamer/beamerouterthemesmoothbars.sty

raw
1 % Copyright 2007 by Till Tantau
2 % Copyright 2015 by Vedran Mileti\'c, Joseph Wright
3 % Copyright 2019-2026 by Joseph Wright, samcarter
4 %
5 % This file may be distributed and/or modified
6 %
7 % 1. under the LaTeX Project Public License and/or
8 % 2. under the GNU Public License.
9 %
10 % See the file LICENSE.md for more details.
11
12 \newif\ifbeamer@sb@subsection
13
14 \DeclareOptionBeamer{subsection}[true]{\csname beamer@sb@subsection#1\endcsname}
15 \ExecuteOptionsBeamer{subsection=true}
16 \ProcessOptionsBeamer
17
18
19
20 \mode<presentation>
21
22 \setbeamercolor{frametitle}{parent=palette primary}
23 \setbeamercolor{subsection in head/foot}{parent=palette secondary}
24 \setbeamercolor{section in head/foot}{parent=palette quaternary}
25
26
27 \beamer@compresstrue
28
29 \AtBeginDocument{
30 {
31 \usebeamerfont*{headline}
32 \colorlet{global.bg}{bg}
33 \usebeamercolor{subsection in head/foot}
34 \usebeamercolor{section in head/foot}
35 \usebeamercolor{frametitle}
36
37 \ifbeamer@sb@subsection
38 \pgfdeclareverticalshading{beamer@barshade}{\the\paperwidth}{%
39 color(0ex)=(subsection in head/foot.bg);%
40 color(2.25ex)=(subsection in head/foot.bg);%
41 color(3.25ex)=(section in head/foot.bg);%
42 color(8.75ex)=(section in head/foot.bg)%
43 }
44 \pgfdeclareverticalshading{beamer@aboveframetitle}{\the\paperwidth}{%
45 color(0ex)=(frametitle.bg);%
46 color(1ex)=(subsection in head/foot.bg)
47 }
48 \else
49 \pgfdeclareverticalshading{beamer@barshade}{\the\paperwidth}{%
50 color(0ex)=(section in head/foot.bg);%
51 color(6ex)=(section in head/foot.bg)%
52 }
53 \pgfdeclareverticalshading{beamer@aboveframetitle}{\the\paperwidth}{%
54 color(0ex)=(frametitle.bg);%
55 color(1ex)=(frametitle.bg);%
56 color(2ex)=(section in head/foot.bg)
57 }
58 \fi
59
60 \begingroup
61 \selectcolormodel{gray}
62 \pgfdeclareverticalshading{beamer@belowframetitle}{\the\paperwidth}{%
63 color(0ex)=(pgftransparent!100);%
64 color(1ex)=(pgftransparent!0)
65 }
66 \pgfdeclarefading{beamer@belowframetitlemask}{\pgfuseshading{beamer@belowframetitle}}
67 \endgroup
68 }
69 }
70
71 % Head
72 \defbeamertemplate*{headline}{smoothbars theme}
73 {%
74 \pgfuseshading{beamer@barshade}%
75 \vskip-0.05ex%
76 \begin{beamercolorbox}[wd=\paperwidth,ht=1ex,dp=0ex]{empty}
77 \begin{pgfpicture}
78 \begin{pgfscope}%
79 \ifbeamer@sb@subsection%
80 \pgfsetfillcolor{subsection in head/foot.bg}%
81 \else%
82 \pgfsetfillcolor{section in head/foot.bg}%
83 \fi%
84 \pgfpathrectangle{\pgfpoint{-.5\paperwidth}{-0.5ex}}{\pgfpoint{\paperwidth}{1ex}}%
85 \pgfsetfading{beamer@belowframetitlemask}{}%
86 \pgfusepath{fill}%
87 \end{pgfscope}%
88 \end{pgfpicture}%
89 \end{beamercolorbox}%
90 \ifbeamer@sb@subsection%
91 \vskip-9.75ex%
92 \else%
93 \vskip-6.85ex%
94 \fi%
95 \begin{beamercolorbox}[ignorebg,ht=2.25ex,dp=3.75ex]{section in head/foot}
96 \insertnavigation{\paperwidth}
97 \end{beamercolorbox}%
98 \ifbeamer@sb@subsection%
99 \begin{beamercolorbox}[ignorebg,ht=2.125ex,dp=1.125ex,%
100 leftskip=.3cm,rightskip=.3cm plus1fil]{subsection in head/foot}
101 \usebeamerfont{subsection in head/foot}\usebeamertemplate{subsection in head/foot}
102 \end{beamercolorbox}%
103 \vskip-0.1ex%
104 \fi%
105 }%
106
107
108 \defbeamertemplate*{frametitle}{smoothbars theme}
109 {%
110 \nointerlineskip%
111 \vskip-0.1ex%
112 \usebeamerfont{headline}%
113 \begin{beamercolorbox}[wd=\paperwidth,ht=1ex,dp=1ex,vmode]{empty}
114 \pgfuseshading{beamer@aboveframetitle}%
115 \end{beamercolorbox}%
116 \vskip-1.09ex%
117 \nointerlineskip%
118 \begin{beamercolorbox}[wd=\paperwidth,leftskip=.3cm,rightskip=.3cm plus1fil,vmode]{frametitle}
119 \vskip0.5ex%
120 \usebeamerfont*{frametitle}\strut\insertframetitle%
121 \ifx\insertframesubtitle\@empty%
122 \strut\par%
123 \else
124 \par{\usebeamerfont*{framesubtitle}{\usebeamercolor[fg]{framesubtitle}\strut\insertframesubtitle}\strut\par}%
125 \fi%%
126 \usebeamerfont{headline}%
127 \vskip0.05ex%
128 \end{beamercolorbox}%
129 \nointerlineskip%
130 \vskip-0.05ex%
131 \begin{beamercolorbox}[wd=\paperwidth,ht=1ex,dp=0ex]{empty}
132 \begin{pgfpicture}
133 \begin{pgfscope}%
134 \pgfsetfillcolor{frametitle.bg}%
135 \pgfpathrectangle{\pgfpoint{-.5\paperwidth}{-.5ex}}{\pgfpoint{\paperwidth}{1ex}}%
136 \pgfsetfading{beamer@belowframetitlemask}{}%
137 \pgfusepath{fill}%
138 \end{pgfscope}%
139 \end{pgfpicture}%
140 \end{beamercolorbox}%
141 }
142
143
144 \mode
145 <all>