Debian Codegraph @

src/gtk4/widgets/_headerbar.scss

raw
1 @charset "UTF-8";
2
3 /***************
4 * Header bars *
5 ***************/
6
7 %titlebar,
8 headerbar {
9 padding: 0px 6px;
10 border-width: 0px 0px 1px 0px;
11 border-radius: $window-border-radius $window-border-radius 0px 0px;
12 border-style: solid;
13 border-color: gtk("@borders");
14 color: gtk("@theme_titlebar_foreground");
15 background-image: none;
16 background-color: gtk("@theme_titlebar_background");
17 border-top: 1px solid lighter(gtk("@theme_titlebar_background"));
18
19 &:backdrop {
20 background-image: none;
21 background-color: gtk(
22 "@theme_titlebar_background_backdrop"
23 );
24 color: gtk("@theme_titlebar_foreground_backdrop");
25 border-top: 1px solid lighter(gtk("@theme_titlebar_background_backdrop"));
26 box-shadow: none;
27 }
28 label {
29 font-weight: normal;
30 &:backdrop {
31 color: gtk("@theme_titlebar_foreground_backdrop");
32 }
33 }
34 .path-bar button {
35 color: gtk("@theme_titlebar_foreground");
36 font-weight: normal;
37 &:backdrop {
38 color: gtk("@theme_titlebar_foreground_backdrop");
39 }
40 }
41 .linked button {
42 @include neobutton(normal);
43 }
44 button {
45 @include neobutton(toolbutton);
46
47 //ensure we don't have a shadow on headerbar buttons at all
48 box-shadow: none;
49 color: gtk("@theme_titlebar_foreground");
50
51 &:hover {
52 color: gtk("@theme_titlebar_foreground");
53 }
54
55 &:backdrop {
56 background-image: none;
57 background-color: gtk(
58 "@theme_titlebar_background_backdrop"
59 );
60 color: gtk("@theme_titlebar_foreground_backdrop");
61 }
62
63 &.flat:backdrop,
64 &.flat:backdrop:disabled,
65 &:disabled:backdrop {
66 background-image: none;
67 background-color: gtk(
68 "@theme_titlebar_background_backdrop"
69 );
70 color: gtk("@theme_titlebar_foreground_backdrop");
71 border-color: transparent;
72 }
73 &.flat:disabled {
74 @extend %undecorated_button;
75 color: gtk("@theme_titlebar_foreground_insensitive");
76 }
77 &:disabled {
78 background-color: transparent;
79 background-image: none;
80 border-color: transparent;
81 color: gtk("@theme_titlebar_foreground_insensitive");
82 }
83 }
84
85 .title {
86 font-weight: normal;
87 padding: 0px 12px;
88 &:backdrop {
89 color: gtk("@theme_titlebar_foreground_backdrop");
90 }
91 }
92
93 .subtitle {
94 font-size: smaller;
95 padding: 0 12px;
96 @extend .dim-label;
97 &:backdrop {
98 color: gtk("@theme_titlebar_foreground_backdrop");
99 }
100 }
101
102 separator {
103 border-width: 0px;
104 background-color: transparent;
105 background-image: none;
106 border-color: transparent;
107 }
108
109 &.selection-mode,
110 &.selection-mode headerbar {
111 background-color: gtkmix(
112 "@theme_titlebar_background",
113 "@theme_button_decoration_focus",
114 0.5
115 );
116 separator {
117 background-color: gtk(
118 "@theme_button_decoration_focus"
119 );
120 }
121 button:not(.titlebutton) {
122 background-color: gtkalpha(
123 gtk("@theme_button_decoration_focus"),
124 0.5
125 );
126 &:active,
127 &:focus {
128 background-color: gtk(
129 "@theme_button_decoration_focus"
130 );
131 }
132 }
133
134 .subtitle:link {
135 @extend %link, :selected;
136 }
137
138 .selection-menu {
139 padding: 4px 6px;
140
141 .arrow {
142 -gtk-icon-source: -gtk-icontheme($arrow_down);
143 -gtk-icon-shadow: none;
144 }
145 }
146 }
147
148 .tiled &,
149 .maximized & {
150 border-radius: 0; // squared corners when the window is max'd or tiled
151 }
152 }
153
154 headerbar {
155 // add vertical margins to headerbar entries, buttons and separators to avoid them spanning the whole height
156 entry,
157 spinbutton,
158 separator,
159 button {
160 margin-top: 8px;
161 margin-bottom: 8px;
162 }
163 }