Skip to content

Commit db13fe3

Browse files
committed
gtk3: Add styling for libhandy 1.0.0
Closes #45
1 parent 6028d5f commit db13fe3

File tree

9 files changed

+235
-0
lines changed

9 files changed

+235
-0
lines changed
Lines changed: 227 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,227 @@
1+
/* Based on _Adwaita-base.scss from libhandy */
2+
3+
// HdyComboRow
4+
5+
popover.combo {
6+
padding: 0;
7+
8+
list {
9+
background-color: transparent;
10+
11+
> row {
12+
padding: 0 10px;
13+
min-height: 50px;
14+
15+
&:first-child { @extend %linked_vertical_top; }
16+
&:last-child { @extend %linked_vertical_bottom; }
17+
}
18+
}
19+
20+
overshoot.top { @extend %linked_vertical_top; }
21+
overshoot.bottom { @extend %linked_vertical_bottom; }
22+
23+
scrollbar.vertical {
24+
&:dir(ltr) { @extend %linked_right; }
25+
&:dir(rtl) { @extend %linked_left; }
26+
}
27+
}
28+
29+
// HdyExpanderRow
30+
31+
row.expander {
32+
padding: 0px;
33+
34+
&:checked image.expander-row-arrow:not(:disabled) {
35+
color: $selected_bg_color;
36+
}
37+
38+
image.expander-row-arrow:disabled {
39+
color: $insensitive_fg_color;
40+
}
41+
}
42+
43+
// HdyKeypad
44+
45+
keypad {
46+
.digit {
47+
font-size: 200%;
48+
font-weight: bold;
49+
}
50+
51+
.letters {
52+
font-size: 70%;
53+
}
54+
55+
.symbol {
56+
font-size: 160%;
57+
}
58+
}
59+
60+
// HdyViewSwitcher
61+
62+
viewswitcher {
63+
&, & button {
64+
margin: 0;
65+
padding: 0;
66+
}
67+
68+
button {
69+
border-radius: 0;
70+
border-top: 0;
71+
border-bottom: 0;
72+
73+
&:not(:checked):not(:hover) {
74+
background: transparent;
75+
border-color: transparent;
76+
}
77+
78+
&:checked, &:active {
79+
border-color: $selected_bg_color;
80+
}
81+
82+
// View switcher button
83+
> stack > box {
84+
&.narrow {
85+
font-size: 0.75rem;
86+
padding-top: 7px;
87+
padding-bottom: 5px;
88+
89+
image,
90+
label {
91+
padding-left: 8px;
92+
padding-right: 8px;
93+
}
94+
}
95+
96+
&.wide {
97+
padding: 8px 10px;
98+
99+
label {
100+
&:dir(ltr) {
101+
padding-right: 7px;
102+
}
103+
104+
&:dir(rtl) {
105+
padding-left: 7px;
106+
}
107+
}
108+
}
109+
}
110+
111+
&.needs-attention {
112+
> stack > box label {
113+
background-image: -gtk-gradient(radial, center center, 0, center center, 0.5, to($selected_bg_color), to(transparent));
114+
background-size: 6px 6px;
115+
background-repeat: no-repeat;
116+
background-position: right 0px;
117+
118+
&:dir(rtl) {
119+
background-position: left 0px;
120+
}
121+
}
122+
123+
&:active > stack > box label {
124+
background-image: -gtk-gradient(radial, center center, 0, center center, 0.5, to($selected_fg_color), to(transparent));
125+
}
126+
}
127+
}
128+
}
129+
130+
// HdyViewSwitcherBar
131+
132+
viewswitcherbar actionbar > revealer > box {
133+
padding: 0;
134+
}
135+
136+
// Content list
137+
138+
list.content {
139+
&,
140+
list {
141+
background-color: transparent;
142+
}
143+
144+
// Nested rows background
145+
list.nested > row:not(:active) {
146+
&:not(:hover):not(:selected),
147+
&:hover:not(.activatable):not(:selected) {
148+
background-color: mix($bg_color, $base_color);
149+
}
150+
151+
&:hover.activatable:not(:selected) {
152+
background-color: if($variant != 'dark', transparentize(black, 0.95), transparentize(white, 0.97));
153+
}
154+
}
155+
156+
> row {
157+
// Regular rows and expander header rows background
158+
&:not(.expander):not(:active):not(:hover):not(:selected),
159+
&:not(.expander):not(:active):hover:not(.activatable):not(:selected),
160+
&.expander row.header:not(:active):not(:hover):not(:selected),
161+
&.expander row.header:not(:active):hover:not(.activatable):not(:selected) {
162+
background-color: $base_color;
163+
}
164+
165+
&:not(.expander):not(:active):hover.activatable:not(:selected),
166+
&.expander row.header:not(:active):hover.activatable:not(:selected) {
167+
background-color: if($variant != 'dark', transparentize(black, 0.95), transparentize(white, 0.97));
168+
}
169+
170+
&,
171+
list > row {
172+
border-color: $borders_color;
173+
border-style: solid;
174+
transition: 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
175+
}
176+
177+
// Top border
178+
&:not(:last-child) {
179+
border-width: 1px 1px 0px 1px;
180+
}
181+
182+
// Rounded top
183+
&:first-child,
184+
&.expander:first-child row.header,
185+
&.expander:checked,
186+
&.expander:checked row.header,
187+
&.expander:checked + row,
188+
&.expander:checked + row.expander row.header {
189+
@extend %linked_vertical_top;
190+
}
191+
192+
// Bottom border
193+
&:last-child,
194+
&.checked-expander-row-previous-sibling,
195+
&.expander:checked {
196+
border-width: 1px;
197+
}
198+
199+
// Rounded bottom
200+
&:last-child,
201+
&.checked-expander-row-previous-sibling,
202+
&.expander:checked,
203+
&.expander:not(:checked):last-child row.header,
204+
&.expander:not(:checked).checked-expander-row-previous-sibling row.header,
205+
&.expander.empty:checked row.header,
206+
&.expander list.nested > row:last-child {
207+
@extend %linked_vertical_bottom;
208+
}
209+
210+
// Add space around expanded rows
211+
&.expander:checked:not(:first-child),
212+
&.expander:checked + row {
213+
margin-top: 5px;
214+
}
215+
}
216+
}
217+
218+
// Unified window
219+
220+
window.csd.unified:not(.solid-csd):not(.fullscreen):not(.tiled):not(.tiled-top):not(.tiled-bottom):not(.tiled-left):not(.tiled-right):not(.maximized) {
221+
&,
222+
> decoration,
223+
> decoration-overlay {
224+
border-radius: $_header_radius $_header_radius 0 0;
225+
}
226+
}
227+

common/gtk-3.0/3.24/sass/gtk-dark.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ $transparency: 'true';
1111
@import 'transparent_widgets';
1212
@import 'colors-public';
1313
@import 'budgie';
14+
@import 'libhandy';

common/gtk-3.0/3.24/sass/gtk-darker.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ $transparency: 'true';
1111
@import 'transparent_widgets';
1212
@import 'colors-public';
1313
@import 'budgie';
14+
@import 'libhandy';

common/gtk-3.0/3.24/sass/gtk-lighter.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ $transparency: 'true';
1111
@import 'transparent_widgets';
1212
@import 'colors-public';
1313
@import 'budgie';
14+
@import 'libhandy';

common/gtk-3.0/3.24/sass/gtk-solid-dark.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ $transparency: 'false';
1111
@import 'transparent_widgets';
1212
@import 'colors-public';
1313
@import 'budgie';
14+
@import 'libhandy';

common/gtk-3.0/3.24/sass/gtk-solid-darker.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ $transparency: 'false';
1111
@import 'transparent_widgets';
1212
@import 'colors-public';
1313
@import 'budgie';
14+
@import 'libhandy';

common/gtk-3.0/3.24/sass/gtk-solid-lighter.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ $transparency: 'false';
1111
@import 'transparent_widgets';
1212
@import 'colors-public';
1313
@import 'budgie';
14+
@import 'libhandy';

common/gtk-3.0/3.24/sass/gtk-solid.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ $transparency: 'false';
1111
@import 'transparent_widgets';
1212
@import 'colors-public';
1313
@import 'budgie';
14+
@import 'libhandy';

common/gtk-3.0/3.24/sass/gtk.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ $transparency: 'true';
1111
@import 'transparent_widgets';
1212
@import 'colors-public';
1313
@import 'budgie';
14+
@import 'libhandy';

0 commit comments

Comments
 (0)