From b4519ac0cd29bbb9a31b763df490b0fb249d775f Mon Sep 17 00:00:00 2001 From: Lapo Calamandrei Date: Mon, 14 Jul 2014 18:29:08 +0200 Subject: [PATCH] Adwaita: list-row style --- gtk/resources/theme/Adwaita/_common.scss | 41 +++++++++++++++---- .../theme/Adwaita/gtk-contained-dark.css | 37 +++++++++++------ gtk/resources/theme/Adwaita/gtk-contained.css | 37 +++++++++++------ 3 files changed, 80 insertions(+), 35 deletions(-) diff --git a/gtk/resources/theme/Adwaita/_common.scss b/gtk/resources/theme/Adwaita/_common.scss index f620113919..bceb842ec6 100644 --- a/gtk/resources/theme/Adwaita/_common.scss +++ b/gtk/resources/theme/Adwaita/_common.scss @@ -1918,26 +1918,49 @@ GtkScrolledWindow { } } -.list-row.button, .list-row, .grid-child { - background-image: none; - border-style: none; - box-shadow: none; - border-width: 0; padding: 2px; } -.list-row.button:hover { - background-color: darken($base_color, 10%); +.list-row.button { + @extend %undecorated_button; + background-color: transparentize($base_color,1); // for the transition + border-style: none; // I need no borders here + border-radius: 0; // and no rounded corners + box-shadow: none; // and no box-shadow + &:hover { + background-color: mix($fg_color, $base_color, 5%); + } + &:active { + color: $selected_bg_color; + box-shadow: inset 0 2px 3px -1px transparentize(black,0.7); + } + &:selected { + @extend .list-row:selected; + &:active { box-shadow: inset 0 2px 3px -1px transparentize(black,0.5); } + &:hover { background-color: mix($selected_fg_color,$selected_bg_color,10%);} + } + &:backdrop:hover { + @extend %undecorated_button; + } } -.list-row.button:selected, +.list-row:selected { + //FIXME %selected_items needs to be a mixin + color: $selected_fg_color; + background-color: $selected_bg_color; + &:backdrop { + color: $backdrop_base_color; + } +} + +/*.list-row.button:selected, .list-row:selected { background-color: $selected_bg_color; color: $selected_fg_color; &:backdrop { color: $backdrop_base_color;} -} +}*/ /********************* * App Notifications * diff --git a/gtk/resources/theme/Adwaita/gtk-contained-dark.css b/gtk/resources/theme/Adwaita/gtk-contained-dark.css index 99cbc2697b..feaaf2c256 100644 --- a/gtk/resources/theme/Adwaita/gtk-contained-dark.css +++ b/gtk/resources/theme/Adwaita/gtk-contained-dark.css @@ -591,7 +591,7 @@ border-radius: 3px; border-style: solid; } -.button.flat, .button.flat:backdrop, .menuitem.button.flat, .menuitem.button.flat:backdrop, .menuitem.button.flat:backdrop:hover, .button:link, .button:visited, .button:link:hover, .button:link:active, .button:visited:hover, .button:visited:active, .button:link:backdrop, .button:visited:backdrop, .notebook tab .button, GtkCalendar.button, GtkCalendar.button:hover, GtkCalendar.button:backdrop, GtkCalendar.button:backdrop:hover, .scale-popup .button:hover, .scale-popup .button:backdrop, .scale-popup .button:backdrop:hover, .scale-popup .button:backdrop:insensitive { +.button.flat, .button.flat:backdrop, .menuitem.button.flat, .menuitem.button.flat:backdrop, .menuitem.button.flat:backdrop:hover, .button:link, .button:visited, .button:link:hover, .button:link:active, .button:visited:hover, .button:visited:active, .button:link:backdrop, .button:visited:backdrop, .notebook tab .button, .list-row.button, .list-row.button:backdrop:hover, GtkCalendar.button, GtkCalendar.button:hover, GtkCalendar.button:backdrop, GtkCalendar.button:backdrop:hover, .scale-popup .button:hover, .scale-popup .button:backdrop, .scale-popup .button:backdrop:hover, .scale-popup .button:backdrop:insensitive { border-color: transparent; background-color: transparent; background-image: none; @@ -2436,26 +2436,37 @@ GtkScrolledWindow GtkViewport.frame { background-color: #2c2c2c; border-color: #1e2222; } -.list-row.button, .list-row, .grid-child { - background-image: none; - border-style: none; - box-shadow: none; - border-width: 0; padding: 2px; } -.list-row.button:hover { - background-color: #101010; } +.list-row.button { + background-color: rgba(41, 41, 41, 0); + border-style: none; + border-radius: 0; + box-shadow: none; } + .list-row.button:hover { + background-color: #323232; } + .list-row.button:active { + color: #215d9c; + box-shadow: inset 0 2px 3px -1px rgba(0, 0, 0, 0.3); } + .button.list-row:active:selected { + box-shadow: inset 0 2px 3px -1px rgba(0, 0, 0, 0.5); } + .button.list-row:hover:selected { + background-color: #376da5; } -.list-row.button:selected, -.list-row:selected { - background-color: #215d9c; - color: white; } - .list-row.button:selected:backdrop, +.list-row:selected, .list-row.button:selected { + color: white; + background-color: #215d9c; } .list-row:selected:backdrop { color: #2c2c2c; } +/*.list-row.button:selected, +.list-row:selected { + background-color: $selected_bg_color; + color: $selected_fg_color; + &:backdrop { color: $backdrop_base_color;} +}*/ /********************* * App Notifications * *********************/ diff --git a/gtk/resources/theme/Adwaita/gtk-contained.css b/gtk/resources/theme/Adwaita/gtk-contained.css index 68fcecf998..8644774d56 100644 --- a/gtk/resources/theme/Adwaita/gtk-contained.css +++ b/gtk/resources/theme/Adwaita/gtk-contained.css @@ -583,7 +583,7 @@ border-radius: 3px; border-style: solid; } -.button.flat, .button.flat:backdrop, .menuitem.button.flat, .menuitem.button.flat:backdrop, .menuitem.button.flat:backdrop:hover, .button:link, .button:visited, .button:link:hover, .button:link:active, .button:visited:hover, .button:visited:active, .button:link:backdrop, .button:visited:backdrop, .notebook tab .button, GtkCalendar.button, GtkCalendar.button:hover, GtkCalendar.button:backdrop, GtkCalendar.button:backdrop:hover, .scale-popup .button:hover, .scale-popup .button:backdrop, .scale-popup .button:backdrop:hover, .scale-popup .button:backdrop:insensitive { +.button.flat, .button.flat:backdrop, .menuitem.button.flat, .menuitem.button.flat:backdrop, .menuitem.button.flat:backdrop:hover, .button:link, .button:visited, .button:link:hover, .button:link:active, .button:visited:hover, .button:visited:active, .button:link:backdrop, .button:visited:backdrop, .notebook tab .button, .list-row.button, .list-row.button:backdrop:hover, GtkCalendar.button, GtkCalendar.button:hover, GtkCalendar.button:backdrop, GtkCalendar.button:backdrop:hover, .scale-popup .button:hover, .scale-popup .button:backdrop, .scale-popup .button:backdrop:hover, .scale-popup .button:backdrop:insensitive { border-color: transparent; background-color: transparent; background-image: none; @@ -2428,26 +2428,37 @@ GtkScrolledWindow GtkViewport.frame { background-color: #fcfcfc; border-color: #a8a8a8; } -.list-row.button, .list-row, .grid-child { - background-image: none; - border-style: none; - box-shadow: none; - border-width: 0; padding: 2px; } -.list-row.button:hover { - background-color: #e6e6e6; } +.list-row.button { + background-color: rgba(255, 255, 255, 0); + border-style: none; + border-radius: 0; + box-shadow: none; } + .list-row.button:hover { + background-color: #f4f4f4; } + .list-row.button:active { + color: #4a90d9; + box-shadow: inset 0 2px 3px -1px rgba(0, 0, 0, 0.3); } + .button.list-row:active:selected { + box-shadow: inset 0 2px 3px -1px rgba(0, 0, 0, 0.5); } + .button.list-row:hover:selected { + background-color: #5c9bdc; } -.list-row.button:selected, -.list-row:selected { - background-color: #4a90d9; - color: white; } - .list-row.button:selected:backdrop, +.list-row:selected, .list-row.button:selected { + color: white; + background-color: #4a90d9; } .list-row:selected:backdrop { color: #fcfcfc; } +/*.list-row.button:selected, +.list-row:selected { + background-color: $selected_bg_color; + color: $selected_fg_color; + &:backdrop { color: $backdrop_base_color;} +}*/ /********************* * App Notifications * *********************/