Skip to content

Commit 2363312

Browse files
committed
Flatter button. More prominent shadow on hover. Fixing #370
Attempt to fix #370. It is a temporary fix. Ideally we must use seperate functions for button and headerbar button.
1 parent 3be320f commit 2363312

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -273,14 +273,14 @@
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.2), $bg);
276+
$button_bg: if(hue($bg) == 0deg, shade($bg, 1.08), $bg);
277277

278278
@extend %button;
279279
@include linear-gradient($button_bg);
280-
@include border(rgba(0, 0, 0, .12 + $border_strength));
280+
border-color: border_normal($button_bg);
281281

282282
color: $fg;
283-
box-shadow: 0 1px 2px -1px alpha($dark_shadow, .12 + $shadow_strength);
283+
//box-shadow: 0 1px 2px -1px alpha($dark_shadow, .12 + $shadow_strength); //making it flatter
284284

285285
&.flat {
286286
border-color: alpha($button_bg, 0);
@@ -292,7 +292,7 @@
292292
&, &.flat {
293293
&:focus, &:hover {
294294
@include linear-gradient(shade($button_bg, 1.2));
295-
@include border(rgba(0, 0, 0, .2 + $border_strength));
295+
@include border(rgba(0, 0, 0, .25 + $border_strength));
296296

297297
box-shadow: 0 1px 2px -1px alpha($dark_shadow, .32 + $shadow_strength);
298298
}
@@ -379,12 +379,12 @@
379379
}
380380

381381
button {
382-
@include button(shade($bg_color, 1.2), $fg_color);
382+
@include button($bg_color, $fg_color);
383383

384384
.inline-toolbar &,
385-
.linked > & { @include linked_button(shade($bg_color, 1.2)); }
385+
.linked > & { @include linked_button($bg_color); }
386386

387-
.linked.vertical > & { @include linked_vertical_button(shade($bg_color, 1.2)); }
387+
.linked.vertical > & { @include linked_vertical_button($bg_color); }
388388

389389
&.circular,
390390
&.circular-button { // FIXME: aggregate to buttons

0 commit comments

Comments
 (0)