[gtk: 1/2] Adwaita: always use link specific colors for link selector



commit 7bb8a480f14e45dd75fdaa68248f5a1b45c267ad
Author: Carlo Lobrano <c lobrano gmail com>
Date:   Thu Nov 21 12:32:37 2019 +0100

    Adwaita: always use link specific colors for link selector
    
    link target uses `$selected_bg_color` and `$selected_fg_color` for the
    definition of some selectors (e.g. selected).
    
    While `$link_color` and `$link_visited_color` are based on
    `$selected_bg_color`, this does not seem coherent.
    
    Replacing `$selected_*g_color` in link target style with link colors
    defined in `_colors.scss file`.

 gtk/theme/Adwaita/_common.scss           | 15 ++++++++-------
 gtk/theme/Adwaita/gtk-contained-dark.css | 10 +++++-----
 gtk/theme/Adwaita/gtk-contained.css      |  8 ++++----
 3 files changed, 17 insertions(+), 16 deletions(-)
---
diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss
index 18d16ec607..28b764ec89 100644
--- a/gtk/theme/Adwaita/_common.scss
+++ b/gtk/theme/Adwaita/_common.scss
@@ -1076,28 +1076,29 @@ list row button.image-button:not(.flat) {
   &:visited {
     color: $link_visited_color;
 
-    *:selected & { color: mix($selected_fg_color, $selected_bg_color, 60%); }
+    *:selected & { color: mix($selected_fg_color, $link_visited_color, 60%); }
   }
 
   &:hover {
-    color: lighten($link_color,10%);
+    $_fg: lighten($link_color, 10%);
+    color: $_fg;
 
-    *:selected & { color: mix($selected_fg_color, $selected_bg_color, 90%); }
+    *:selected & { color: mix($selected_fg_color, $_fg, 90%); }
   }
 
   &:active {
     color: $link_color;
 
-    *:selected & { color: mix($selected_fg_color, $selected_bg_color, 80%); }
+    *:selected & { color: mix($selected_fg_color, $link_color, 80%); }
   }
 
-  &:disabled, &:disabled:backdrop { color: transparentize(desaturate($link_color,100%), 0.2); }
+  &:disabled, &:disabled:backdrop { color: transparentize(desaturate($link_color, 100%), 0.2); }
 
-  &:backdrop { &:backdrop:hover, &:backdrop:hover:selected, & { color: $selected_bg_color; }}
+  &:backdrop { &:backdrop:hover, &:backdrop:hover:selected, & { color: transparentize($link_color, 0.1); }}
 
   @at-root %link_selected,
   &:selected,
-  *:selected & { color: mix($selected_fg_color, $selected_bg_color, 80%); }
+  *:selected & { color: mix($selected_fg_color, $link_color, 80%); }
 }
 
 button:link,
diff --git a/gtk/theme/Adwaita/gtk-contained-dark.css b/gtk/theme/Adwaita/gtk-contained-dark.css
index f39e58760a..b6f89f57ca 100644
--- a/gtk/theme/Adwaita/gtk-contained-dark.css
+++ b/gtk/theme/Adwaita/gtk-contained-dark.css
@@ -490,21 +490,21 @@ button:link > label, button:visited > label, *:link, button:link, button:visited
 
 button:link > label:visited, button:visited > label:visited, *:link:visited, button:visited { color: 
#1b6acb; }
 
-*:selected button:link > label:visited, *:selected button:visited > label:visited, *:selected 
*:link:visited, *:selected button:visited:link, *:selected button:visited { color: #a1bad8; }
+*:selected button:link > label:visited, *:selected button:visited > label:visited, *:selected 
*:link:visited, *:selected button:visited:link, *:selected button:visited { color: #a4c4ea; }
 
 button:link > label:hover, button:visited > label:hover, *:link:hover, button:hover:link, 
button:hover:visited { color: #629fea; }
 
-*:selected button:link > label:hover, *:selected button:visited > label:hover, *:selected *:link:hover, 
*:selected button:hover:link, *:selected button:hover:visited { color: #e8eef5; }
+*:selected button:link > label:hover, *:selected button:visited > label:hover, *:selected *:link:hover, 
*:selected button:hover:link, *:selected button:hover:visited { color: #eff5fd; }
 
 button:link > label:active, button:visited > label:active, *:link:active, button:active:link, 
button:active:visited { color: #3584e4; }
 
-*:selected button:link > label:active, *:selected button:visited > label:active, *:selected *:link:active, 
*:selected button:active:link, *:selected button:active:visited { color: #d0ddec; }
+*:selected button:link > label:active, *:selected button:visited > label:active, *:selected *:link:active, 
*:selected button:active:link, *:selected button:active:visited { color: #d7e6fa; }
 
 button:link > label:disabled, button:visited > label:disabled, button:link > label:disabled:backdrop, 
button:visited > label:disabled:backdrop, *:link:disabled, button:disabled:link, button:disabled:visited, 
*:link:disabled:backdrop, button:disabled:backdrop:link, button:disabled:backdrop:visited { color: rgba(141, 
141, 141, 0.8); }
 
-button:link > label:backdrop:backdrop:hover, button:visited > label:backdrop:backdrop:hover, button:link > 
label:backdrop:backdrop:hover:selected, button:visited > label:backdrop:backdrop:hover:selected, button:link 
label:backdrop, button:visited > label:backdrop, *:link:backdrop:backdrop:hover, 
button:backdrop:backdrop:hover:link, button:backdrop:backdrop:hover:visited, 
*:link:backdrop:backdrop:hover:selected, button:backdrop:backdrop:hover:selected:link, 
button:backdrop:backdrop:hover:selected:visited, .selection-mode .titlebar:not(headerbar) 
.subtitle:backdrop:backdrop:hover:link, .selection-mode.titlebar:not(headerbar) 
.subtitle:backdrop:backdrop:hover:link, .selection-mode headerbar .subtitle:backdrop:backdrop:hover:link, 
headerbar.selection-mode .subtitle:backdrop:backdrop:hover:link, *:link:backdrop, button:backdrop:link, 
button:backdrop:visited { color: #15539e; }
+button:link > label:backdrop:backdrop:hover, button:visited > label:backdrop:backdrop:hover, button:link > 
label:backdrop:backdrop:hover:selected, button:visited > label:backdrop:backdrop:hover:selected, button:link 
label:backdrop, button:visited > label:backdrop, *:link:backdrop:backdrop:hover, 
button:backdrop:backdrop:hover:link, button:backdrop:backdrop:hover:visited, 
*:link:backdrop:backdrop:hover:selected, button:backdrop:backdrop:hover:selected:link, 
button:backdrop:backdrop:hover:selected:visited, .selection-mode .titlebar:not(headerbar) 
.subtitle:backdrop:backdrop:hover:link, .selection-mode.titlebar:not(headerbar) 
.subtitle:backdrop:backdrop:hover:link, .selection-mode headerbar .subtitle:backdrop:backdrop:hover:link, 
headerbar.selection-mode .subtitle:backdrop:backdrop:hover:link, *:link:backdrop, button:backdrop:link, 
button:backdrop:visited { color: rgba(53, 132, 228, 0.9); }
 
-button:link > label:selected, button:visited > label:selected, *:selected button:link > label, *:selected 
button:visited > label, *:link:selected, button:selected:link, button:selected:visited, .selection-mode 
.titlebar:not(headerbar) .subtitle:link, .selection-mode.titlebar:not(headerbar) .subtitle:link, 
.selection-mode headerbar .subtitle:link, headerbar.selection-mode .subtitle:link, *:selected *:link, 
*:selected button:link, *:selected button:visited { color: #d0ddec; }
+button:link > label:selected, button:visited > label:selected, *:selected button:link > label, *:selected 
button:visited > label, *:link:selected, button:selected:link, button:selected:visited, .selection-mode 
.titlebar:not(headerbar) .subtitle:link, .selection-mode.titlebar:not(headerbar) .subtitle:link, 
.selection-mode headerbar .subtitle:link, headerbar.selection-mode .subtitle:link, *:selected *:link, 
*:selected button:link, *:selected button:visited { color: #d7e6fa; }
 
 button:link, button:visited { text-shadow: none; }
 
diff --git a/gtk/theme/Adwaita/gtk-contained.css b/gtk/theme/Adwaita/gtk-contained.css
index 947de1b248..290f281915 100644
--- a/gtk/theme/Adwaita/gtk-contained.css
+++ b/gtk/theme/Adwaita/gtk-contained.css
@@ -498,7 +498,7 @@ button:link > label, button:visited > label, *:link, button:link, button:visited
 
 button:link > label:visited, button:visited > label:visited, *:link:visited, button:visited { color: 
#15539e; }
 
-*:selected button:link > label:visited, *:selected button:visited > label:visited, *:selected 
*:link:visited, *:selected button:visited:link, *:selected button:visited { color: #aecef4; }
+*:selected button:link > label:visited, *:selected button:visited > label:visited, *:selected 
*:link:visited, *:selected button:visited:link, *:selected button:visited { color: #a1bad8; }
 
 button:link > label:hover, button:visited > label:hover, *:link:hover, button:hover:link, 
button:hover:visited { color: #3584e4; }
 
@@ -506,13 +506,13 @@ button:link > label:hover, button:visited > label:hover, *:link:hover, button:ho
 
 button:link > label:active, button:visited > label:active, *:link:active, button:active:link, 
button:active:visited { color: #1b6acb; }
 
-*:selected button:link > label:active, *:selected button:visited > label:active, *:selected *:link:active, 
*:selected button:active:link, *:selected button:active:visited { color: #d7e6fa; }
+*:selected button:link > label:active, *:selected button:visited > label:active, *:selected *:link:active, 
*:selected button:active:link, *:selected button:active:visited { color: #d1e1f5; }
 
 button:link > label:disabled, button:visited > label:disabled, button:link > label:disabled:backdrop, 
button:visited > label:disabled:backdrop, *:link:disabled, button:disabled:link, button:disabled:visited, 
*:link:disabled:backdrop, button:disabled:backdrop:link, button:disabled:backdrop:visited { color: rgba(115, 
115, 115, 0.8); }
 
-button:link > label:backdrop:backdrop:hover, button:visited > label:backdrop:backdrop:hover, button:link > 
label:backdrop:backdrop:hover:selected, button:visited > label:backdrop:backdrop:hover:selected, button:link 
label:backdrop, button:visited > label:backdrop, *:link:backdrop:backdrop:hover, 
button:backdrop:backdrop:hover:link, button:backdrop:backdrop:hover:visited, 
*:link:backdrop:backdrop:hover:selected, button:backdrop:backdrop:hover:selected:link, 
button:backdrop:backdrop:hover:selected:visited, .selection-mode .titlebar:not(headerbar) 
.subtitle:backdrop:backdrop:hover:link, .selection-mode.titlebar:not(headerbar) 
.subtitle:backdrop:backdrop:hover:link, .selection-mode headerbar .subtitle:backdrop:backdrop:hover:link, 
headerbar.selection-mode .subtitle:backdrop:backdrop:hover:link, *:link:backdrop, button:backdrop:link, 
button:backdrop:visited { color: #3584e4; }
+button:link > label:backdrop:backdrop:hover, button:visited > label:backdrop:backdrop:hover, button:link > 
label:backdrop:backdrop:hover:selected, button:visited > label:backdrop:backdrop:hover:selected, button:link 
label:backdrop, button:visited > label:backdrop, *:link:backdrop:backdrop:hover, 
button:backdrop:backdrop:hover:link, button:backdrop:backdrop:hover:visited, 
*:link:backdrop:backdrop:hover:selected, button:backdrop:backdrop:hover:selected:link, 
button:backdrop:backdrop:hover:selected:visited, .selection-mode .titlebar:not(headerbar) 
.subtitle:backdrop:backdrop:hover:link, .selection-mode.titlebar:not(headerbar) 
.subtitle:backdrop:backdrop:hover:link, .selection-mode headerbar .subtitle:backdrop:backdrop:hover:link, 
headerbar.selection-mode .subtitle:backdrop:backdrop:hover:link, *:link:backdrop, button:backdrop:link, 
button:backdrop:visited { color: rgba(27, 106, 203, 0.9); }
 
-button:link > label:selected, button:visited > label:selected, *:selected button:link > label, *:selected 
button:visited > label, *:link:selected, button:selected:link, button:selected:visited, .selection-mode 
.titlebar:not(headerbar) .subtitle:link, .selection-mode.titlebar:not(headerbar) .subtitle:link, 
.selection-mode headerbar .subtitle:link, headerbar.selection-mode .subtitle:link, *:selected *:link, 
*:selected button:link, *:selected button:visited { color: #d7e6fa; }
+button:link > label:selected, button:visited > label:selected, *:selected button:link > label, *:selected 
button:visited > label, *:link:selected, button:selected:link, button:selected:visited, .selection-mode 
.titlebar:not(headerbar) .subtitle:link, .selection-mode.titlebar:not(headerbar) .subtitle:link, 
.selection-mode headerbar .subtitle:link, headerbar.selection-mode .subtitle:link, *:selected *:link, 
*:selected button:link, *:selected button:visited { color: #d1e1f5; }
 
 button:link, button:visited { text-shadow: none; }
 


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