Adwaita: parametric bottom edge color for entries

The entry mixin now allows to specify the color of the widget bottom
edge hilight, istead then just enable/disable it, so `$noegde: true`
now is `$egde: none` or `$edge: $somecolor`, not setting it draws
the edge with the default theme color.
This commit is contained in:
Lapo Calamandrei 2014-09-03 13:18:39 +02:00
parent ae81e4ee1b
commit 6adaf4b74f
3 changed files with 9 additions and 8 deletions

View File

@ -232,7 +232,7 @@ GtkFlowBox .grid-child {
@include entry(normal);
&.flat, &.flat:focus {
padding: 2px;
@include entry(normal, $noedge:true);
@include entry(normal, $edge:none);
border: none;
border-radius: 0;
}

View File

@ -23,21 +23,22 @@
@return linear-gradient(to bottom, darken($c,3%), $c 90%);
}
@mixin entry($t, $fc:$selected_bg_color, $noedge:false) {
@mixin entry($t, $fc:$selected_bg_color, $edge: $borders_edge) {
//
// Entries drawing function
//
// $t: entry type
// $fc: focus color
// $noedge: set to true not to draw the bottom edge hilight
// $edge: set to none to not draw the bottom edge or specify a color to not
// use the default one
//
// possible $t values:
// normal, focus, insensitive, backdrop, backdrop-insensitive;
//
background-color: transparent;
background-image: entry_gradient($base_color);
$_blank_edge: if($noedge, none, 0 1px transparentize(white,1));
$_entry_edge: if($noedge, none, widget_edge());
$_blank_edge: if($edge == none, none, 0 1px transparentize($edge,1));
$_entry_edge: if($edge == none, none, widget_edge($edge));
$_inner_shadows: inset 0 3px mix(black, $base_color, 3%),
inset 0 1px mix(black, $base_color, 18%);
@if $variant == 'dark' {

View File

@ -194,14 +194,14 @@ GtkFlowBox .grid-child {
color: #c9cbc9;
border-color: #1e2222;
background-image: linear-gradient(to bottom, #2c2c2c);
box-shadow: inset 0 2px rgba(38, 38, 38, 0), inset 0 1px rgba(33, 33, 33, 0), 0 1px rgba(255, 255, 255, 0); }
box-shadow: inset 0 2px rgba(38, 38, 38, 0), inset 0 1px rgba(33, 33, 33, 0), 0 1px rgba(238, 238, 236, 0); }
.entry:backdrop:insensitive {
background-color: transparent;
background-image: linear-gradient(to bottom, #212121, #292929 90%);
color: #5d6767;
border-color: #1e2222;
background-image: linear-gradient(to bottom, #323636);
box-shadow: inset 0 2px rgba(38, 38, 38, 0), inset 0 1px rgba(33, 33, 33, 0), 0 1px rgba(255, 255, 255, 0); }
box-shadow: inset 0 2px rgba(38, 38, 38, 0), inset 0 1px rgba(33, 33, 33, 0), 0 1px rgba(238, 238, 236, 0); }
.entry:selected, .entry:backdrop:selected {
background-color: #215d9c;
color: #ffffff; }
@ -2872,7 +2872,7 @@ GtkLevelBar.vertical {
color: #c9cbc9;
border-color: #1e2222;
background-image: linear-gradient(to bottom, #2c2c2c);
box-shadow: inset 0 2px rgba(38, 38, 38, 0), inset 0 1px rgba(33, 33, 33, 0), 0 1px rgba(255, 255, 255, 0); }
box-shadow: inset 0 2px rgba(38, 38, 38, 0), inset 0 1px rgba(33, 33, 33, 0), 0 1px rgba(238, 238, 236, 0); }
.level-bar.fill-block {
border: 1px solid #1c5187;
background-color: #215d9c;