From 7d1d9e26d79bf470c0c87cc30f04feae831b8224 Mon Sep 17 00:00:00 2001 From: Lapo Calamandrei Date: Mon, 1 Sep 2014 19:10:50 +0200 Subject: [PATCH] Adwaita: make links on selected bg visible... --- gtk/resources/theme/Adwaita/_common.scss | 9 +++++---- .../theme/Adwaita/gtk-contained-dark.css | 16 +++++++++------- gtk/resources/theme/Adwaita/gtk-contained.css | 16 +++++++++------- 3 files changed, 23 insertions(+), 18 deletions(-) diff --git a/gtk/resources/theme/Adwaita/_common.scss b/gtk/resources/theme/Adwaita/_common.scss index 69015b9bdf..5ff5b7d9c1 100644 --- a/gtk/resources/theme/Adwaita/_common.scss +++ b/gtk/resources/theme/Adwaita/_common.scss @@ -694,26 +694,26 @@ GtkColorButton.button { color: $selected_bg_color; //FIXME use a proper color &:hover, &:active, &:visited { color: mix($fg_color, $selected_bg_color, 40%); //FIXME same here + *:selected & { color: mix($selected_fg_color, $selected_bg_color, 80%); } } - &:backdrop, &:backdrop:hover { + &:backdrop, &:backdrop:hover, &:backdrop:hover:selected { color: $selected_bg_color; } + &:selected, *:selected & { color: $selected_fg_color; } } .button:link, .button:visited { - color: $selected_bg_color; //FIXME use a proper color @extend %undecorated_button; + @extend *:link; text-shadow: none; &:hover, &:active, &:checked { @extend %undecorated_button; - color: mix($fg_color, $selected_bg_color, 40%); //FIXME same here text-shadow: none; } &:backdrop { @extend %undecorated_button; //This shouldn't be needed but avoids //a weird transition which for some reason //makes borders blink on hover - color: $selected_bg_color; //FIXME use a proper color } } @@ -998,6 +998,7 @@ GtkComboBox { background-image: linear-gradient(to bottom, $selected_bg_color); box-shadow: inset 0 1px mix($top_hilight,$selected_bg_color, 60%); } + .subtitle:link { @extend *:link:selected; } .button { @include button(normal, $selected_bg_color, $selected_fg_color, noedge); &:hover { @include button(hover, $selected_bg_color, $selected_fg_color, diff --git a/gtk/resources/theme/Adwaita/gtk-contained-dark.css b/gtk/resources/theme/Adwaita/gtk-contained-dark.css index fba49360dc..ac2a86c4c9 100644 --- a/gtk/resources/theme/Adwaita/gtk-contained-dark.css +++ b/gtk/resources/theme/Adwaita/gtk-contained-dark.css @@ -939,21 +939,23 @@ GtkColorButton.button { /********* * Links * *********/ -*:link { +*:link, .button:link, .button:visited { color: #215d9c; } - *:link:hover, *:link:active, *:link:visited { + *:link:hover, .button:hover:link, .button:hover:visited, *:link:active, .button:active:link, .button:active:visited, *:link:visited, .button:visited { color: #7397bc; } - *:link:backdrop, *:link:backdrop:hover { + *:selected *:link:hover, *:selected .button:hover:link, *:selected .button:hover:visited, *:selected *:link:active, *:selected .button:active:link, *:selected .button:active:visited, *:selected *:link:visited, *:selected .button:visited { + color: #d2deeb; } + *:link:backdrop, .button:backdrop:link, .button:backdrop:visited, *:link:backdrop:hover, .button:backdrop:hover:link, .button:backdrop:hover:visited, *:link:backdrop:hover:selected, .button:backdrop:hover:selected:link, .button:backdrop:hover:selected:visited, .titlebar.selection-mode .subtitle:backdrop:hover:link, GtkCalendar.selection-mode.header .subtitle:backdrop:hover:link, + .header-bar.selection-mode .subtitle:backdrop:hover:link { color: #215d9c; } + *:link:selected, .button:selected:link, .button:selected:visited, .titlebar.selection-mode .subtitle:link, GtkCalendar.selection-mode.header .subtitle:link, + .header-bar.selection-mode .subtitle:link, *:selected *:link, *:selected .button:link, *:selected .button:visited { + color: #ffffff; } .button:link, .button:visited { - color: #215d9c; text-shadow: none; } .button:link:hover, .button:link:active, .button:link:checked, .button:visited:hover, .button:visited:active, .button:visited:checked { - color: #7397bc; text-shadow: none; } - .button:link:backdrop, .button:visited:backdrop { - color: #215d9c; } /***************** * GtkSpinButton * diff --git a/gtk/resources/theme/Adwaita/gtk-contained.css b/gtk/resources/theme/Adwaita/gtk-contained.css index 4f35d4990f..e276198156 100644 --- a/gtk/resources/theme/Adwaita/gtk-contained.css +++ b/gtk/resources/theme/Adwaita/gtk-contained.css @@ -931,21 +931,23 @@ GtkColorButton.button { /********* * Links * *********/ -*:link { +*:link, .button:link, .button:visited { color: #4a90d9; } - *:link:hover, *:link:active, *:link:visited { + *:link:hover, .button:hover:link, .button:hover:visited, *:link:active, .button:active:link, .button:active:visited, *:link:visited, .button:visited { color: #3e6b97; } - *:link:backdrop, *:link:backdrop:hover { + *:selected *:link:hover, *:selected .button:hover:link, *:selected .button:hover:visited, *:selected *:link:active, *:selected .button:active:link, *:selected .button:active:visited, *:selected *:link:visited, *:selected .button:visited { + color: #dae8f7; } + *:link:backdrop, .button:backdrop:link, .button:backdrop:visited, *:link:backdrop:hover, .button:backdrop:hover:link, .button:backdrop:hover:visited, *:link:backdrop:hover:selected, .button:backdrop:hover:selected:link, .button:backdrop:hover:selected:visited, .titlebar.selection-mode .subtitle:backdrop:hover:link, GtkCalendar.selection-mode.header .subtitle:backdrop:hover:link, + .header-bar.selection-mode .subtitle:backdrop:hover:link { color: #4a90d9; } + *:link:selected, .button:selected:link, .button:selected:visited, .titlebar.selection-mode .subtitle:link, GtkCalendar.selection-mode.header .subtitle:link, + .header-bar.selection-mode .subtitle:link, *:selected *:link, *:selected .button:link, *:selected .button:visited { + color: #ffffff; } .button:link, .button:visited { - color: #4a90d9; text-shadow: none; } .button:link:hover, .button:link:active, .button:link:checked, .button:visited:hover, .button:visited:active, .button:visited:checked { - color: #3e6b97; text-shadow: none; } - .button:link:backdrop, .button:visited:backdrop { - color: #4a90d9; } /***************** * GtkSpinButton *