Various tweaks
parent
bf32925cb7
commit
7f0f008de0
|
@ -80,7 +80,7 @@
|
||||||
@include toolbar($selected_bg_color, $selected_fg_color);
|
@include toolbar($selected_bg_color, $selected_fg_color);
|
||||||
|
|
||||||
.button {
|
.button {
|
||||||
@include button(shade($selected_bg_color, 1.68), shade($selected_bg_color, 0.8));
|
@include button($selected_bg_color, $selected_fg_color);
|
||||||
|
|
||||||
&.suggested-action { @extend .suggested-action.button; }
|
&.suggested-action { @extend .suggested-action.button; }
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,8 +2,6 @@
|
||||||
! Buttons
|
! Buttons
|
||||||
**********/
|
**********/
|
||||||
|
|
||||||
$shadow_strength: .3;
|
|
||||||
|
|
||||||
@include exports("button_extends") {
|
@include exports("button_extends") {
|
||||||
%button {
|
%button {
|
||||||
padding: $spacing ($spacing + 2px);
|
padding: $spacing ($spacing + 2px);
|
||||||
|
@ -75,13 +73,16 @@ $shadow_strength: .3;
|
||||||
}
|
}
|
||||||
|
|
||||||
@mixin linked_button($bg) {
|
@mixin linked_button($bg) {
|
||||||
|
$border_strength: if(lightness($bg) > 50, 0, .1);
|
||||||
|
$shadow_strength: if(lightness($bg) > 50, 0, .1);
|
||||||
|
|
||||||
@extend %linked_button;
|
@extend %linked_button;
|
||||||
|
|
||||||
box-shadow: inset -1px 0 border_normal(rgba(0,0,0,.12)),
|
box-shadow: inset -1px 0 border_normal(rgba(0,0,0,.12 + $border_strength)),
|
||||||
0 1px 2px -1px alpha($dark_shadow, .12 + $shadow_strength);
|
0 1px 2px -1px alpha($dark_shadow, .12 + $shadow_strength);
|
||||||
|
|
||||||
&:focus, &:hover {
|
&:focus, &:hover {
|
||||||
box-shadow: inset -1px 0 border_focus(rgba(0,0,0,.12)),
|
box-shadow: inset -1px 0 border_focus(rgba(0,0,0,.12 + $border_strength)),
|
||||||
0 1px 2px -1px alpha($dark_shadow, .32 + $shadow_strength);
|
0 1px 2px -1px alpha($dark_shadow, .32 + $shadow_strength);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -89,7 +90,7 @@ $shadow_strength: .3;
|
||||||
&:active:focus, &:active:hover:focus,
|
&:active:focus, &:active:hover:focus,
|
||||||
&:checked, &:checked:hover,
|
&:checked, &:checked:hover,
|
||||||
&:checked:focus, &:checked:hover:focus {
|
&:checked:focus, &:checked:hover:focus {
|
||||||
box-shadow: inset -1px 0 border_active(rgba(0,0,0,.12)),
|
box-shadow: inset -1px 0 border_active(rgba(0,0,0,.12 + $border_strength)),
|
||||||
inset 0 1px alpha($dark_shadow, .07),
|
inset 0 1px alpha($dark_shadow, .07),
|
||||||
inset 0 -1px alpha($dark_shadow, .05);
|
inset 0 -1px alpha($dark_shadow, .05);
|
||||||
}
|
}
|
||||||
|
@ -119,51 +120,63 @@ $shadow_strength: .3;
|
||||||
}
|
}
|
||||||
|
|
||||||
@mixin button($bg, $fg) {
|
@mixin button($bg, $fg) {
|
||||||
|
$border_strength: if(lightness($bg) > 50, 0, .1);
|
||||||
|
$shadow_strength: if(lightness($bg) > 50, 0, .1);
|
||||||
|
|
||||||
|
$button_bg: if(hue($bg) == 0deg, shade($bg, 1.2), $bg);
|
||||||
|
|
||||||
@extend %button;
|
@extend %button;
|
||||||
@include linear-gradient(shade($bg, 1.3));
|
@include linear-gradient($button_bg);
|
||||||
@include border(rgba(0,0,0,.12));
|
@include border(rgba(0,0,0,.12 + $border_strength));
|
||||||
|
|
||||||
color: $fg;
|
color: $fg;
|
||||||
box-shadow: 0 1px 2px -1px alpha($dark_shadow, .12 + $shadow_strength);
|
box-shadow: 0 1px 2px -1px alpha($dark_shadow, .12 + $shadow_strength);
|
||||||
border-color: alpha($bg, 0);
|
|
||||||
|
|
||||||
&.flat {
|
&.flat {
|
||||||
border-color: alpha($bg, 0);
|
border-color: alpha($button_bg, 0);
|
||||||
background-color: alpha($bg, 0);
|
background-color: alpha($button_bg, 0);
|
||||||
background-image: none;
|
background-image: none;
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
&, &.flat {
|
&, &.flat {
|
||||||
&:focus, &:hover {
|
&:focus, &:hover {
|
||||||
@include linear-gradient(shade($bg, 1.4));
|
@include linear-gradient(shade($button_bg, 1.2));
|
||||||
|
@include border(rgba(0,0,0,.2 + $border_strength));
|
||||||
|
|
||||||
border-color: alpha($bg, 0);
|
|
||||||
box-shadow: 0 1px 2px -1px alpha($dark_shadow, .32 + $shadow_strength);
|
box-shadow: 0 1px 2px -1px alpha($dark_shadow, .32 + $shadow_strength);
|
||||||
}
|
}
|
||||||
|
|
||||||
&:active, &:checked {
|
&:active, &:checked {
|
||||||
@include linear-gradient(shade($bg, .9), to top);
|
@include linear-gradient(shade($button_bg, .7), to top);
|
||||||
|
|
||||||
color: $fg;
|
color: white;
|
||||||
box-shadow: inset 1px 0 alpha($dark_shadow, .06),
|
box-shadow: inset 1px 0 alpha($dark_shadow, .06),
|
||||||
inset 0 1px alpha($dark_shadow, .07),
|
inset 0 1px alpha($dark_shadow, .07),
|
||||||
inset -1px 0 alpha($dark_shadow, .06),
|
inset -1px 0 alpha($dark_shadow, .06),
|
||||||
inset 0 -1px alpha($dark_shadow, .05);
|
inset 0 -1px alpha($dark_shadow, .05);
|
||||||
|
|
||||||
|
&:focus, &:hover {
|
||||||
|
@include linear-gradient(shade($button_bg, .65), to top);
|
||||||
|
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&:focus, &:hover { color: $fg; }
|
||||||
|
|
||||||
&:active:insensitive, &:checked:insensitive {
|
&:active:insensitive, &:checked:insensitive {
|
||||||
@include linear-gradient(shade($bg, .8));
|
@include linear-gradient(shade($button_bg, .9));
|
||||||
|
|
||||||
color: $fg;
|
color: $fg;
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:insensitive:insensitive {
|
&:insensitive:insensitive {
|
||||||
@if (lightness($bg) > 50) {
|
@if (lightness($button_bg) > 50) {
|
||||||
@include linear-gradient(shade($bg, .95));
|
@include linear-gradient(shade($button_bg, .95));
|
||||||
} @else {
|
} @else {
|
||||||
@include linear-gradient(alpha($bg, .3));
|
@include linear-gradient(alpha($button_bg, .3));
|
||||||
}
|
}
|
||||||
|
|
||||||
color: mix($bg, $fg, .5);
|
color: mix($bg, $fg, .5);
|
||||||
|
@ -175,7 +188,7 @@ $shadow_strength: .3;
|
||||||
border: 1px solid currentColor;
|
border: 1px solid currentColor;
|
||||||
color: shade($bg, ($contrast + .1));
|
color: shade($bg, ($contrast + .1));
|
||||||
|
|
||||||
&:insensitive { color: shade($bg, .85); }
|
&:insensitive { color: shade($button_bg, .85); }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -214,7 +227,7 @@ $shadow_strength: .3;
|
||||||
}
|
}
|
||||||
|
|
||||||
.button {
|
.button {
|
||||||
@include button($bg_color, $fg_color);
|
@include button(shade($bg_color, 1.2), $fg_color);
|
||||||
|
|
||||||
&.default { @include button($selected_bg_color, $selected_fg_color); }
|
&.default { @include button($selected_bg_color, $selected_fg_color); }
|
||||||
|
|
||||||
|
|
|
@ -117,18 +117,18 @@
|
||||||
color: shade($menu_bg_color, ($contrast + .1));
|
color: shade($menu_bg_color, ($contrast + .1));
|
||||||
}
|
}
|
||||||
|
|
||||||
&.button {
|
&.button, &.button.flat {
|
||||||
&, &:focus, &:active, &:insensitive, &:active:insensitive {
|
&, &:focus, &:active, &:insensitive, &:active:insensitive {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
background-image: none;
|
background-image: none;
|
||||||
border: none;
|
border: 0;
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
color: currentColor;
|
color: currentColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:hover, &:focus:hover, &:active:hover, &:selected {
|
&:hover, &:focus:hover, &:active:hover, &:selected {
|
||||||
background-color: $selected_bg_color;
|
|
||||||
background-image: none;
|
background-image: none;
|
||||||
|
background-color: $selected_bg_color;
|
||||||
color: $selected_fg_color;
|
color: $selected_fg_color;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -175,7 +175,7 @@
|
||||||
background-color: $menu_bg_color;
|
background-color: $menu_bg_color;
|
||||||
background-image: none;
|
background-image: none;
|
||||||
color: $menu_fg_color;
|
color: $menu_fg_color;
|
||||||
box-shadow: 0 2px 3px alpha(black, .5);
|
box-shadow: 0 3px 6px alpha(black, .16);
|
||||||
|
|
||||||
&.background {
|
&.background {
|
||||||
background-image: none;
|
background-image: none;
|
||||||
|
|
|
@ -49,14 +49,18 @@
|
||||||
|
|
||||||
@include exports("notifications") {
|
@include exports("notifications") {
|
||||||
.app-notification {
|
.app-notification {
|
||||||
|
&, &.frame {
|
||||||
border-style: solid;
|
border-style: solid;
|
||||||
border-color: border_normal($base_color);
|
border-color: border_normal($osd_bg);
|
||||||
border-width: 0 1px 1px 1px;
|
border-width: 0 1px 1px 1px;
|
||||||
border-radius: 0 0 $roundness $roundness;
|
border-radius: 0 0 $roundness $roundness;
|
||||||
padding: $spacing * 3;
|
padding: $spacing * 2;
|
||||||
background-color: $base_color;
|
background-color: $osd_bg;
|
||||||
background-image: none;
|
background-image: none;
|
||||||
color: $text_color;
|
color: $osd_fg;
|
||||||
|
|
||||||
|
.button { @include button($osd_bg, $osd_fg); }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
&.osd {
|
&.osd {
|
||||||
-GtkProgressBar-xspacing: 0;
|
-GtkProgressBar-xspacing: 0;
|
||||||
-GtkProgressBar-yspacing: 0;
|
-GtkProgressBar-yspacing: 0;
|
||||||
-GtkProgressBar-min-horizontal-bar-height: 4;
|
-GtkProgressBar-min-horizontal-bar-height: 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.trough {
|
&.trough {
|
||||||
|
@ -119,8 +119,8 @@
|
||||||
|
|
||||||
|
|
||||||
&.slider {
|
&.slider {
|
||||||
@include linear-gradient($base_color);
|
@include linear-gradient(shade($bg_color, 1.08));
|
||||||
@include border($base_color);
|
@include border($bg_color);
|
||||||
|
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
border-width: 1px;
|
border-width: 1px;
|
||||||
|
@ -146,13 +146,13 @@
|
||||||
&.trough {
|
&.trough {
|
||||||
@include linear-gradient(shade($bg_color, 1.08));
|
@include linear-gradient(shade($bg_color, 1.08));
|
||||||
|
|
||||||
margin: 8px 0;
|
margin: 7px 0;
|
||||||
border: 0;
|
border: 1px solid alpha(border_normal($bg_color), 0.5);
|
||||||
border-radius: $roundness;
|
border-radius: $roundness;
|
||||||
|
|
||||||
&:insensitive { @include linear-gradient(shade($bg_color, 0.9)); }
|
&:insensitive { @include linear-gradient(shade($bg_color, 0.9)); }
|
||||||
|
|
||||||
&.vertical { margin: 0 8px; }
|
&.vertical { margin: 0 7px; }
|
||||||
}
|
}
|
||||||
|
|
||||||
&.highlight {
|
&.highlight {
|
||||||
|
|
|
@ -102,7 +102,7 @@
|
||||||
&:hover, &:hover:focus {
|
&:hover, &:hover:focus {
|
||||||
background-image: none;
|
background-image: none;
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
color: $selected_bg-color;
|
color: $selected_bg_color;
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
.window-frame {
|
.window-frame {
|
||||||
@extend %window;
|
@extend %window;
|
||||||
|
|
||||||
border: 0;
|
border: none;
|
||||||
border-radius: $roundness + 1;
|
border-radius: $roundness $roundness 0 0;
|
||||||
|
|
||||||
/* this is used for the resize cursor area */
|
/* this is used for the resize cursor area */
|
||||||
margin: $spacing * 3;
|
margin: $spacing * 3;
|
||||||
|
|
Loading…
Reference in New Issue