[gtk+] Adwaita: fix GtkPlacesSidebar styling.



commit c92c25b5d75368038ea29bdc25468d981d197a3d
Author: Lapo Calamandrei <calamandrei gmail com>
Date:   Tue Sep 1 18:14:45 2015 +0200

    Adwaita: fix GtkPlacesSidebar styling.

 gtk/theme/Adwaita/_common.scss           |   25 +++++++++----------------
 gtk/theme/Adwaita/gtk-contained-dark.css |   17 +++++------------
 gtk/theme/Adwaita/gtk-contained.css      |   17 +++++------------
 3 files changed, 19 insertions(+), 40 deletions(-)
---
diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss
index ea6e548..3953c0c 100644
--- a/gtk/theme/Adwaita/_common.scss
+++ b/gtk/theme/Adwaita/_common.scss
@@ -2574,7 +2574,8 @@ GtkScrolledWindow {
 .list-row.activatable {
   // let's take care of background colors
   &:hover {
-    background-color: mix($fg_color, $base_color, 5%);
+    //background-color: mix($fg_color, $base_color, 5%);
+    background-color: if(variant == light, transparentize($fg_color, 0.9), transparentize($fg_color, 0.95));
   }
   &:active {
     box-shadow: inset 0 2px 2px -2px transparentize(black, 0.8);
@@ -2898,19 +2899,17 @@ GtkSidebarRow {
 }
 
 GtkPlacesSidebar.sidebar {
+  // in the sidebar case it makes no sense to click the selected row
+  .list-row:selected:active { box-shadow: none; }
+
   .sidebar-placeholder-row {
     border: solid 1px $selected_bg_color;
   }
+
   .sidebar-new-bookmark-row {
-    background-color: darken($sidebar_bg_color, 10%);
-  }
-  // Preserve everything else of the list-row class
-  @at-root .list-row.button {
-    // Popover menuitem color
-    &:hover {
-      background-color: mix($fg_color, $bg_color, 10%);
-    }
+    color: $selected_bg_color;
   }
+
   @at-root .sidebar-button.button { // @at-root needded to not change the specificity making button styling 
inheritance broken
                                     // so istead of "GtkPlacesSidebar.sidebar .sidebar-button.button" 
[specificity 0,0,3,1]
                                     // the extended selector ".sidebar-button.button" [specificity 0,0,2,0]
@@ -2920,16 +2919,10 @@ GtkPlacesSidebar.sidebar {
     @extend .button.flat;
     border-radius: 100%;
     outline-radius: 100%;
-/*    &:hover:not(:active):not(:backdrop) {
-      background-image: none;
-      background-color: gtkalpha(currentColor, 0.1);
-      border-color: transparentize($borders_color, 1);
-      box-shadow: inset 0 0 transparentize(white, 1);
-      icon-shadow: none;
-    } */
     &:not(:hover):not(:active) > GtkImage,
     &:backdrop > GtkImage { opacity: $_placesidebar_icons_opacity };
   }
+
 }
 
 .sidebar-item {
diff --git a/gtk/theme/Adwaita/gtk-contained-dark.css b/gtk/theme/Adwaita/gtk-contained-dark.css
index ec804a4..4a4b711 100644
--- a/gtk/theme/Adwaita/gtk-contained-dark.css
+++ b/gtk/theme/Adwaita/gtk-contained-dark.css
@@ -3463,7 +3463,7 @@ GtkScrolledWindow GtkViewport.frame {
   padding: 2px; }
 
 .list-row.activatable:hover {
-  background-color: #333333; }
+  background-color: rgba(238, 238, 236, 0.05); }
 .list-row.activatable:active {
   box-shadow: inset 0 2px 2px -2px rgba(0, 0, 0, 0.2); }
 .list-row.activatable:backdrop:hover {
@@ -3932,23 +3932,16 @@ GtkSidebarRow .sidebar-label:dir(ltr) {
 GtkSidebarRow .sidebar-label:dir(rtl) {
   padding-left: 2px; }
 
+GtkPlacesSidebar.sidebar .list-row:selected:active {
+  box-shadow: none; }
 GtkPlacesSidebar.sidebar .sidebar-placeholder-row {
   border: solid 1px #215d9c; }
 GtkPlacesSidebar.sidebar .sidebar-new-bookmark-row {
-  background-color: #262a2a; }
-.list-row.button:hover {
-  background-color: #4b5150; }
+  color: #215d9c; }
 .sidebar-button.button, .header-bar .sidebar-button.button.titlebutton,
 .titlebar .sidebar-button.button.titlebutton {
   border-radius: 100%;
-  outline-radius: 100%;
-  /*    &:hover:not(:active):not(:backdrop) {
-        background-image: none;
-        background-color: gtkalpha(currentColor, 0.1);
-        border-color: transparentize($borders_color, 1);
-        box-shadow: inset 0 0 transparentize(white, 1);
-        icon-shadow: none;
-      } */ }
+  outline-radius: 100%; }
   .sidebar-button.button.image-button, GtkScaleButton.sidebar-button.button,
   GtkVolumeButton.sidebar-button.button, .header-bar .sidebar-button.titlebutton.button,
   .titlebar .sidebar-button.titlebutton.button {
diff --git a/gtk/theme/Adwaita/gtk-contained.css b/gtk/theme/Adwaita/gtk-contained.css
index 08bdc2f..8824f97 100644
--- a/gtk/theme/Adwaita/gtk-contained.css
+++ b/gtk/theme/Adwaita/gtk-contained.css
@@ -3625,7 +3625,7 @@ GtkScrolledWindow GtkViewport.frame {
   padding: 2px; }
 
 .list-row.activatable:hover {
-  background-color: whitesmoke; }
+  background-color: rgba(46, 52, 54, 0.05); }
 .list-row.activatable:active {
   box-shadow: inset 0 2px 2px -2px rgba(0, 0, 0, 0.2); }
 .list-row.activatable:backdrop:hover {
@@ -4104,23 +4104,16 @@ GtkSidebarRow .sidebar-label:dir(ltr) {
 GtkSidebarRow .sidebar-label:dir(rtl) {
   padding-left: 2px; }
 
+GtkPlacesSidebar.sidebar .list-row:selected:active {
+  box-shadow: none; }
 GtkPlacesSidebar.sidebar .sidebar-placeholder-row {
   border: solid 1px #4a90d9; }
 GtkPlacesSidebar.sidebar .sidebar-new-bookmark-row {
-  background-color: #d9d9d9; }
-.list-row.button:hover {
-  background-color: #dadbdb; }
+  color: #4a90d9; }
 .sidebar-button.button, .header-bar .sidebar-button.button.titlebutton,
 .titlebar .sidebar-button.button.titlebutton {
   border-radius: 100%;
-  outline-radius: 100%;
-  /*    &:hover:not(:active):not(:backdrop) {
-        background-image: none;
-        background-color: gtkalpha(currentColor, 0.1);
-        border-color: transparentize($borders_color, 1);
-        box-shadow: inset 0 0 transparentize(white, 1);
-        icon-shadow: none;
-      } */ }
+  outline-radius: 100%; }
   .sidebar-button.button.image-button, GtkScaleButton.sidebar-button.button,
   GtkVolumeButton.sidebar-button.button, .header-bar .sidebar-button.titlebutton.button,
   .titlebar .sidebar-button.titlebutton.button {


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