style: Be consistent with Adwaita flat elements in High Contrast
- update drawing mixin for buttons to override HC inset in flat style - drop outlines for app icons in dash Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3143>
This commit is contained in:
parent
703ac12b4a
commit
e58cd282e7
@ -29,12 +29,28 @@
|
||||
//
|
||||
|
||||
// Draw the inset for High Contrast elements
|
||||
@mixin draw_hc_inset($width: 1px, $fc: $hc_inset_color, $border: false) {
|
||||
box-shadow: inset 0 0 0 $width $fc;
|
||||
@mixin draw_hc_inset($width: 1px, $ic: $hc_inset_color, $border: false, $no_inset: false) {
|
||||
//
|
||||
// $width width of the inset, in pixels
|
||||
// $ic color of the inset
|
||||
//
|
||||
// $border if true, use a border instead of a box-shadow to draw inset
|
||||
// $no_inset if true, override the mixin to not draw an iset
|
||||
//
|
||||
|
||||
box-shadow: inset 0 0 0 $width $ic;
|
||||
|
||||
// draw inset as border
|
||||
@if $border {
|
||||
border: $width solid $fc;
|
||||
border: $width solid $ic;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
// don't draw an inset at all
|
||||
@if $no_inset {
|
||||
box-shadow: none;
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
|
||||
// Draw the focus ring
|
||||
@ -217,7 +233,7 @@
|
||||
}
|
||||
|
||||
@if $style == 'default' {
|
||||
@include draw_hc_inset($width:0px);
|
||||
@include draw_hc_inset($no_inset: true);
|
||||
}
|
||||
}
|
||||
|
||||
@ -225,6 +241,11 @@
|
||||
@if $type == 'normal' {
|
||||
color: $tc;
|
||||
background-color: $button_bg_color;
|
||||
|
||||
// no inset in High Contrast when the style is flat
|
||||
@if $style == 'flat' and $contrast == 'high' {
|
||||
@include draw_hc_inset($no_inset: true);
|
||||
}
|
||||
}
|
||||
|
||||
// hover button
|
||||
@ -261,7 +282,7 @@
|
||||
|
||||
// no outline in High Contrast for insensitive buttons
|
||||
@if $contrast == 'high' {
|
||||
@include draw_hc_inset($fc:transparent);
|
||||
@include draw_hc_inset($no_inset: true);
|
||||
}
|
||||
}
|
||||
|
||||
@ -328,9 +349,6 @@
|
||||
&:insensitive { @include button(insensitive, $tc:$fg, $c:$bg, $style: flat, $always_dark: $system);}
|
||||
}
|
||||
|
||||
@if $contrast == 'high' {
|
||||
@include draw_hc_inset();
|
||||
}
|
||||
|
||||
&:highlighted {
|
||||
// brighter background color than other states
|
||||
|
@ -58,10 +58,6 @@ $dash_spacing: $base_margin * 0.5;
|
||||
.overview-icon {
|
||||
@extend %tile;
|
||||
@include button(normal, $tc:$fg, $c:$bg, $style: flat, $always_dark: true);
|
||||
|
||||
@if $contrast == 'high' {
|
||||
@include draw_hc_inset();
|
||||
}
|
||||
}
|
||||
|
||||
&:focus .overview-icon { @include button(focus, $tc:$fg, $c:$bg, $style: flat, $always_dark: true);}
|
||||
|
Loading…
x
Reference in New Issue
Block a user