From 6adaf4b74fa5fe1b1aef4a0eddd848a8aad7405e Mon Sep 17 00:00:00 2001 From: Lapo Calamandrei Date: Wed, 3 Sep 2014 13:18:39 +0200 Subject: [PATCH] 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. --- gtk/resources/theme/Adwaita/_common.scss | 2 +- gtk/resources/theme/Adwaita/_drawing.scss | 9 +++++---- gtk/resources/theme/Adwaita/gtk-contained-dark.css | 6 +++--- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/gtk/resources/theme/Adwaita/_common.scss b/gtk/resources/theme/Adwaita/_common.scss index 77a8680984..73c0300565 100644 --- a/gtk/resources/theme/Adwaita/_common.scss +++ b/gtk/resources/theme/Adwaita/_common.scss @@ -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; } diff --git a/gtk/resources/theme/Adwaita/_drawing.scss b/gtk/resources/theme/Adwaita/_drawing.scss index bb8690905a..2e46a95c72 100644 --- a/gtk/resources/theme/Adwaita/_drawing.scss +++ b/gtk/resources/theme/Adwaita/_drawing.scss @@ -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' { diff --git a/gtk/resources/theme/Adwaita/gtk-contained-dark.css b/gtk/resources/theme/Adwaita/gtk-contained-dark.css index ac5d2fadbf..86d21bf12b 100644 --- a/gtk/resources/theme/Adwaita/gtk-contained-dark.css +++ b/gtk/resources/theme/Adwaita/gtk-contained-dark.css @@ -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;