[nautilus/630-odd-coloring-for-location-highlight-in-sidebar-for-dark-themes] Adwaita: Use variant-agnostic styling



commit 07e427c014a6237f47d57ff0981da746e2ba9591
Author: António Fernandes <antoniojpfernandes gmail com>
Date:   Wed Sep 12 10:31:29 2018 +0000

    Adwaita: Use variant-agnostic styling
    
    We use unsaturated selection style for sidebar rows to make it grab
    less attention. Since we use the light variant of Adwaita, we do this
    by making the colors darker using the shade() CSS color expression.
    
    However, this assumption breaks if the dark variant is explicitly set
    in Tweaks.
    
    While nautilus is not developed for the dark variant, this commit
    makes it work by deriving shading from other theme colors instead.
    
    Fixes https://gitlab.gnome.org/GNOME/nautilus/issues/630

 src/resources/css/Adwaita.css | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/resources/css/Adwaita.css b/src/resources/css/Adwaita.css
index 119d019a4..329611ec7 100644
--- a/src/resources/css/Adwaita.css
+++ b/src/resources/css/Adwaita.css
@@ -88,21 +88,21 @@ entry.search > * {
 /* Sidebar */
 
 .sidebar-row:selected {
-    background: shade(@theme_bg_color, 0.93);
+    background: mix(@theme_bg_color, @theme_fg_color, 0.07);
 }
 
 .sidebar-row:selected,
 .sidebar-row:selected label {
-    color: shade(@theme_fg_color, 0.5);
+    color: mix(@theme_fg_color, @theme_text_color, 0.5);
 }
 
 .sidebar-row:selected:backdrop {
-    background: shade(@theme_bg_color, 0.96);
+    background: mix(@theme_unfocused_bg_color, @theme_unfocused_fg_color, 0.07);
 }
 
 .sidebar-row:selected:backdrop,
 .sidebar-row:selected:backdrop label {
-    color: shade(@theme_unfocused_fg_color, 0.85);
+    color: mix(@theme_unfocused_fg_color, @theme_unfocused_text_color, 0.15);
 }
 
 /* Floating status bar */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]