Skip to content

Commit 9e4844a

Browse files
committed
[Gtk-3.22] Redesign-Buttons (Phase1)
Darker color, lighter button color for hover & focus state. Disabled shadows.
1 parent 2363312 commit 9e4844a

3 files changed

Lines changed: 23 additions & 17 deletions

File tree

src/gtk-3.20/scss/_global.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
@import "functions";
44

55
// default color scheme
6-
$bg_color: if($variant == "dark", #444, #eee);
6+
$bg_color: if($variant == "dark", #444, #dedede);
77
$fg_color: if($variant == "dark", #ddd, #555);
88
$base_color: if($variant == "dark", #333, #fff);
99
$text_color: if($variant == "dark", #eee, #333);

src/gtk-3.20/scss/widgets/_button.scss

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -273,14 +273,19 @@
273273
$border_strength: if(lightness($bg) > 50, 0, .1);
274274
$shadow_strength: if(lightness($bg) > 50, 0, .1);
275275

276-
$button_bg: if(hue($bg) == 0deg, shade($bg, 1.08), $bg);
276+
$button_bg: if(lightness($bg) > 50, shade($bg, 1.08), shade($bg, 1.2));
277277

278278
@extend %button;
279-
@include linear-gradient($button_bg);
280-
border-color: border_normal($button_bg);
281-
279+
@if (lightness($button_bg) > 50) {
280+
border-color: border_normal($button_bg);
281+
@include linear-gradient($button_bg, 1.08);
282+
} @else {
283+
@include linear-gradient($button_bg);
284+
@include border(rgba(0, 0, 0, .12 + $border_strength));
285+
}
286+
282287
color: $fg;
283-
//box-shadow: 0 1px 2px -1px alpha($dark_shadow, .12 + $shadow_strength); //making it flatter
288+
284289

285290
&.flat {
286291
border-color: alpha($button_bg, 0);
@@ -291,24 +296,24 @@
291296

292297
&, &.flat {
293298
&:focus, &:hover {
294-
@include linear-gradient(shade($button_bg, 1.2));
295-
@include border(rgba(0, 0, 0, .25 + $border_strength));
299+
@if (lightness($button_bg) > 50) {
300+
border-color: border_active($button_bg);
301+
@include linear-gradient(shade($button_bg, 1.10));
302+
} @else {
303+
@include linear-gradient(shade($button_bg, 1.2));
304+
@include border(rgba(0, 0, 0, .2 + $border_strength));
305+
}
296306

297-
box-shadow: 0 1px 2px -1px alpha($dark_shadow, .32 + $shadow_strength);
307+
298308
}
309+
299310

300311
&:checked, &:active {
301312
@include linear-gradient(shade($button_bg, .7), to top);
302-
303313
color: $white;
304-
box-shadow: inset 1px 0 alpha($dark_shadow, .06),
305-
inset 0 1px alpha($dark_shadow, .07),
306-
inset -1px 0 alpha($dark_shadow, .06),
307-
inset 0 -1px alpha($dark_shadow, .05);
308314

309315
&:focus, &:hover {
310316
@include linear-gradient(shade($button_bg, .65), to top);
311-
312317
color: $white;
313318
}
314319
}

src/gtk-3.20/scss/widgets/_toolbar.scss

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,12 @@
5050
}
5151

5252
@mixin inline-toolbar($bg, $fg) {
53-
background-image: none;
53+
padding: 1px;
5454
border-width: 0 1px 1px;
5555
border-style: solid;
5656
border-color: $borders_color;
57-
background-color: mix($borders_color, $bg_color, .7);
57+
background-color: shade($bg, 1.08);
58+
background-image: none;
5859

5960
&:backdrop {
6061
border-color: $backdrop_borders_color;

0 commit comments

Comments
 (0)