From 793a3eab8296be8761a70964845c4c77c3625773 Mon Sep 17 00:00:00 2001 From: Lapo Calamandrei Date: Tue, 24 Jun 2014 10:25:49 +0200 Subject: [PATCH] Adwaita: fix view check/radio selected state. --- gtk/resources/theme/Adwaita/_common.scss | 13 ++++++---- .../theme/Adwaita/gtk-contained-dark.css | 24 +++++++++++-------- gtk/resources/theme/Adwaita/gtk-contained.css | 24 +++++++++++-------- 3 files changed, 37 insertions(+), 24 deletions(-) diff --git a/gtk/resources/theme/Adwaita/_common.scss b/gtk/resources/theme/Adwaita/_common.scss index cb15d2e411..171f54c596 100644 --- a/gtk/resources/theme/Adwaita/_common.scss +++ b/gtk/resources/theme/Adwaita/_common.scss @@ -1182,6 +1182,8 @@ GtkSwitch { $asset_suffix: if($variant=='dark', '-dark', ''); @each $w,$a in ('check', 'checkbox'), ('radio','radio') { + + //standard checks and radios @each $s,$as in ('','-unchecked'), (':hover', '-unchecked-hover'), (':selected', '-unchecked-active'), @@ -1253,15 +1255,17 @@ $asset_suffix: if($variant=='dark', '-dark', ''); &:inconsistent { -gtk-icon-source: -gtk-icontheme('#{$a}-mixed-symbolic'); } - &:selected { + &:selected, &:selected:focus { + // :selected:focus not to get overridden by .view style color: transparentize($selected_fg_color,0.9); &:active { color: $selected_fg_color; &:backdrop { color: $backdrop_base_color; } } - &:backdrop { - color: transparentize($backdrop_fg_color,0.9); - } + } + &:backdrop { + color: transparentize($backdrop_fg_color,0.9); + &:selected { color: transparentize($backdrop_base_color,0.9); } } } @@ -1882,6 +1886,7 @@ GtkColorChooserWidget #add-color-button { } } + /********************** * Window Decorations * *********************/ diff --git a/gtk/resources/theme/Adwaita/gtk-contained-dark.css b/gtk/resources/theme/Adwaita/gtk-contained-dark.css index 61eb51630f..fe9032fe32 100644 --- a/gtk/resources/theme/Adwaita/gtk-contained-dark.css +++ b/gtk/resources/theme/Adwaita/gtk-contained-dark.css @@ -1485,14 +1485,16 @@ GtkSwitch { color: transparent; } .view.check:inconsistent { -gtk-icon-source: -gtk-icontheme("checkbox-mixed-symbolic"); } - .view.check:selected { + .view.check:selected, .view.check:selected:focus { color: rgba(255, 255, 255, 0.1); } - .view.check:selected:active { + .view.check:selected:active, .view.check:selected:focus:active { color: white; } - .view.check:selected:active:backdrop { + .view.check:selected:active:backdrop, .view.check:selected:focus:active:backdrop { color: #2c2c2c; } - .view.check:selected:backdrop { - color: rgba(201, 203, 201, 0.1); } + .view.check:backdrop { + color: rgba(201, 203, 201, 0.1); } + .view.check:backdrop:selected { + color: rgba(44, 44, 44, 0.1); } .popover .button.check:hover { color: rgba(238, 238, 236, 0.1); } @@ -1630,14 +1632,16 @@ GtkSwitch { color: transparent; } .view.radio:inconsistent { -gtk-icon-source: -gtk-icontheme("radio-mixed-symbolic"); } - .view.radio:selected { + .view.radio:selected, .view.radio:selected:focus { color: rgba(255, 255, 255, 0.1); } - .view.radio:selected:active { + .view.radio:selected:active, .view.radio:selected:focus:active { color: white; } - .view.radio:selected:active:backdrop { + .view.radio:selected:active:backdrop, .view.radio:selected:focus:active:backdrop { color: #2c2c2c; } - .view.radio:selected:backdrop { - color: rgba(201, 203, 201, 0.1); } + .view.radio:backdrop { + color: rgba(201, 203, 201, 0.1); } + .view.radio:backdrop:selected { + color: rgba(44, 44, 44, 0.1); } .popover .button.radio:hover { color: rgba(238, 238, 236, 0.1); } diff --git a/gtk/resources/theme/Adwaita/gtk-contained.css b/gtk/resources/theme/Adwaita/gtk-contained.css index 6365a20f03..61d7fa2c86 100644 --- a/gtk/resources/theme/Adwaita/gtk-contained.css +++ b/gtk/resources/theme/Adwaita/gtk-contained.css @@ -1484,14 +1484,16 @@ GtkSwitch { color: transparent; } .view.check:inconsistent { -gtk-icon-source: -gtk-icontheme("checkbox-mixed-symbolic"); } - .view.check:selected { + .view.check:selected, .view.check:selected:focus { color: rgba(255, 255, 255, 0.1); } - .view.check:selected:active { + .view.check:selected:active, .view.check:selected:focus:active { color: white; } - .view.check:selected:active:backdrop { + .view.check:selected:active:backdrop, .view.check:selected:focus:active:backdrop { color: #fcfcfc; } - .view.check:selected:backdrop { - color: rgba(84, 89, 90, 0.1); } + .view.check:backdrop { + color: rgba(84, 89, 90, 0.1); } + .view.check:backdrop:selected { + color: rgba(252, 252, 252, 0.1); } .popover .button.check:hover { color: rgba(46, 52, 54, 0.1); } @@ -1629,14 +1631,16 @@ GtkSwitch { color: transparent; } .view.radio:inconsistent { -gtk-icon-source: -gtk-icontheme("radio-mixed-symbolic"); } - .view.radio:selected { + .view.radio:selected, .view.radio:selected:focus { color: rgba(255, 255, 255, 0.1); } - .view.radio:selected:active { + .view.radio:selected:active, .view.radio:selected:focus:active { color: white; } - .view.radio:selected:active:backdrop { + .view.radio:selected:active:backdrop, .view.radio:selected:focus:active:backdrop { color: #fcfcfc; } - .view.radio:selected:backdrop { - color: rgba(84, 89, 90, 0.1); } + .view.radio:backdrop { + color: rgba(84, 89, 90, 0.1); } + .view.radio:backdrop:selected { + color: rgba(252, 252, 252, 0.1); } .popover .button.radio:hover { color: rgba(46, 52, 54, 0.1); }