[gtk+] Adwaita: GtkPlacesSidebar treeview text color fix



commit c84f544fc382c8b806633c9a272329e6dbc7d88d
Author: Lapo Calamandrei <calamandrei gmail com>
Date:   Mon Oct 20 15:22:42 2014 +0200

    Adwaita: GtkPlacesSidebar treeview text color fix
    
    With my latest changes we have a darker text color for views and
    entries (which I assume are content), the places sidebar is totally
    chrome though so it needs the chrome text color back.

 gtk/resources/theme/Adwaita/_common.scss           |   16 ++++-
 gtk/resources/theme/Adwaita/gtk-contained-dark.css |   62 ++++++++++----------
 gtk/resources/theme/Adwaita/gtk-contained.css      |   62 ++++++++++----------
 3 files changed, 77 insertions(+), 63 deletions(-)
---
diff --git a/gtk/resources/theme/Adwaita/_common.scss b/gtk/resources/theme/Adwaita/_common.scss
index 4f3f466..c285190 100644
--- a/gtk/resources/theme/Adwaita/_common.scss
+++ b/gtk/resources/theme/Adwaita/_common.scss
@@ -2701,8 +2701,7 @@ GtkFileChooserDialog {
  * Sidebar *
  ***********/
 
-.sidebar,
-.sidebar .view {
+.sidebar {
   border: none;
   $_sidebar_bg: lighten($bg_color,5%);
   background-color: $_sidebar_bg;
@@ -2724,7 +2723,18 @@ GtkFileChooserDialog {
   &:selected {
     background-color: $selected_bg_color;
   }
-  .separator:backdrop { @extend .separator; } // overriden w/o this
+}
+
+// Places sidebar is a special case, since the view here have to look like chrome not content, so we 
override text color
+GtkPlacesSidebar.sidebar .view {
+  color: $fg_color;
+  &:backdrop { color: $backdrop_fg_color; }
+  &:selected {
+    color: $selected_fg_color;
+    &:backdrop { color: if($variant == 'light', $backdrop_base_color, $selected_bg_color); }
+  }
+  .separator,
+  .separator:backdrop { @extend .separator; }
 }
 
 .sidebar-item {
diff --git a/gtk/resources/theme/Adwaita/gtk-contained-dark.css 
b/gtk/resources/theme/Adwaita/gtk-contained-dark.css
index d8c267c..e531953 100644
--- a/gtk/resources/theme/Adwaita/gtk-contained-dark.css
+++ b/gtk/resources/theme/Adwaita/gtk-contained-dark.css
@@ -91,17 +91,16 @@
   background-size: 100px auto;
   background-position: 0% center; }
 
-.label.separator, .sidebar .label.separator:backdrop {
+.label.separator, GtkPlacesSidebar.sidebar .view .label.separator {
   color: #eeeeec; }
-  .label.separator:backdrop,
-  .sidebar .view .label.separator:backdrop {
+  .label.separator:backdrop, GtkPlacesSidebar.sidebar .view .label.separator:backdrop {
     color: #939695; }
 .label:insensitive {
   color: #939695; }
   .label:insensitive:backdrop {
     color: #5d6767; }
 
-.dim-label, .label.separator, .sidebar .label.separator:backdrop, .titlebar .subtitle, GtkCalendar.header 
.subtitle,
+.dim-label, .label.separator, GtkPlacesSidebar.sidebar .view .label.separator, .titlebar .subtitle, 
GtkCalendar.header .subtitle,
 .header-bar .subtitle {
   opacity: 0.55;
   text-shadow: none; }
@@ -1536,9 +1535,9 @@ GtkComboBox {
     color: #5d6767; }
   GtkComboBox .menuitem {
     text-shadow: none; }
-  GtkComboBox .separator, GtkComboBox .sidebar .separator:backdrop, .sidebar GtkComboBox .separator:backdrop,
-  GtkComboBox .sidebar .view .separator:backdrop,
-  .sidebar .view GtkComboBox .separator:backdrop {
+  GtkComboBox .separator, GtkComboBox GtkPlacesSidebar.sidebar .view .separator, GtkPlacesSidebar.sidebar 
.view GtkComboBox .separator,
+  GtkComboBox GtkPlacesSidebar.sidebar .view .separator:backdrop,
+  GtkPlacesSidebar.sidebar .view GtkComboBox .separator:backdrop {
     -GtkWidget-wide-separators: true;
     -GtkWidget-horizontal-separator: 0;
     -GtkWidget-vertical-separator: 0; }
@@ -1604,11 +1603,11 @@ GtkComboBox {
     font-size: smaller;
     padding: 0 12px; }
   .titlebar .header-bar-separator, GtkCalendar.header .header-bar-separator, .titlebar > GtkBox > 
.separator.vertical, GtkCalendar.header > GtkBox > .separator.vertical,
-  .sidebar .view .titlebar > GtkBox > .vertical.separator:backdrop,
-  .sidebar .view GtkCalendar.header > GtkBox > .vertical.separator:backdrop,
+  GtkPlacesSidebar.sidebar .view .titlebar > GtkBox > .vertical.separator:backdrop,
+  GtkPlacesSidebar.sidebar .view GtkCalendar.header > GtkBox > .vertical.separator:backdrop,
   .header-bar .header-bar-separator,
   .header-bar > GtkBox > .separator.vertical,
-  .sidebar .view .header-bar > GtkBox > .vertical.separator:backdrop {
+  GtkPlacesSidebar.sidebar .view .header-bar > GtkBox > .vertical.separator:backdrop {
     -GtkWidget-wide-separators: true;
     -GtkWidget-separator-width: 1px;
     border-width: 0 1px;
@@ -3531,14 +3530,14 @@ GtkProgressBar {
 GtkScrolledWindow GtkViewport.frame {
   border-style: none; }
 
-.separator, .sidebar .separator:backdrop,
-.sidebar .view .separator:backdrop {
+.separator, GtkPlacesSidebar.sidebar .view .separator,
+GtkPlacesSidebar.sidebar .view .separator:backdrop {
   color: rgba(0, 0, 0, 0.1); }
-  GtkFileChooserButton .separator, GtkFileChooserButton .sidebar .separator:backdrop, .sidebar 
GtkFileChooserButton .separator:backdrop,
-  GtkFileChooserButton .sidebar .view .separator:backdrop,
-  .sidebar .view GtkFileChooserButton .separator:backdrop, GtkFontButton .separator, GtkFontButton .sidebar 
.separator:backdrop, .sidebar GtkFontButton .separator:backdrop,
-  GtkFontButton .sidebar .view .separator:backdrop,
-  .sidebar .view GtkFontButton .separator:backdrop {
+  GtkFileChooserButton .separator, GtkFileChooserButton GtkPlacesSidebar.sidebar .view .separator, 
GtkPlacesSidebar.sidebar .view GtkFileChooserButton .separator,
+  GtkFileChooserButton GtkPlacesSidebar.sidebar .view .separator:backdrop,
+  GtkPlacesSidebar.sidebar .view GtkFileChooserButton .separator:backdrop, GtkFontButton .separator, 
GtkFontButton GtkPlacesSidebar.sidebar .view .separator, GtkPlacesSidebar.sidebar .view GtkFontButton 
.separator,
+  GtkFontButton GtkPlacesSidebar.sidebar .view .separator:backdrop,
+  GtkPlacesSidebar.sidebar .view GtkFontButton .separator:backdrop {
     -GtkWidget-wide-separators: true;
     -GtkWidget-horizontal-separator: 0;
     -GtkWidget-vertical-separator: 0; }
@@ -4036,29 +4035,32 @@ GtkFileChooserDialog .dialog-action-box {
 /***********
  * Sidebar *
  ***********/
-.sidebar,
-.sidebar .view {
+.sidebar {
   border: none;
   background-color: #454c4c; }
-  .sidebar .scrollbar.trough,
-  .sidebar .view .scrollbar.trough {
+  .sidebar .scrollbar.trough {
     background-color: #212424;
     border-radius: 6px;
     border-width: 2px;
     border-color: transparent; }
-  .sidebar .scrollbar.slider,
-  .sidebar .view .scrollbar.slider {
+  .sidebar .scrollbar.slider {
     background-color: #454c4c; }
-    .sidebar .scrollbar.slider:hover,
-    .sidebar .view .scrollbar.slider:hover {
+    .sidebar .scrollbar.slider:hover {
       background-color: #515a5a; }
-  .sidebar:backdrop,
-  .sidebar .view:backdrop {
+  .sidebar:backdrop {
     background-color: #454c4c; }
-  .sidebar:selected,
-  .sidebar .view:selected {
+  .sidebar:selected {
     background-color: #215d9c; }
 
+GtkPlacesSidebar.sidebar .view {
+  color: #eeeeec; }
+  GtkPlacesSidebar.sidebar .view:backdrop {
+    color: #939695; }
+  GtkPlacesSidebar.sidebar .view:selected {
+    color: #ffffff; }
+    GtkPlacesSidebar.sidebar .view:selected:backdrop {
+      color: #215d9c; }
+
 .sidebar-item {
   padding: 10px 4px; }
   .sidebar-item > .label {
@@ -4374,7 +4376,7 @@ GtkCalendar.header .menuitem.titlebutton.button:selected, .list-row:selected {
    ----------------
    use responsibly! */
 /*
-widget text/foregroung color */
+widget text/foreground color */
 @define-color theme_fg_color #eeeeec;
 /*
 text color for entries, views and content in general */
diff --git a/gtk/resources/theme/Adwaita/gtk-contained.css b/gtk/resources/theme/Adwaita/gtk-contained.css
index bae135d..7766b1d 100644
--- a/gtk/resources/theme/Adwaita/gtk-contained.css
+++ b/gtk/resources/theme/Adwaita/gtk-contained.css
@@ -91,17 +91,16 @@
   background-size: 100px auto;
   background-position: 0% center; }
 
-.label.separator, .sidebar .label.separator:backdrop {
+.label.separator, GtkPlacesSidebar.sidebar .view .label.separator {
   color: #2e3436; }
-  .label.separator:backdrop,
-  .sidebar .view .label.separator:backdrop {
+  .label.separator:backdrop, GtkPlacesSidebar.sidebar .view .label.separator:backdrop {
     color: #8d9091; }
 .label:insensitive {
   color: #8d9091; }
   .label:insensitive:backdrop {
     color: #c7c7c7; }
 
-.dim-label, .label.separator, .sidebar .label.separator:backdrop, .titlebar .subtitle, GtkCalendar.header 
.subtitle,
+.dim-label, .label.separator, GtkPlacesSidebar.sidebar .view .label.separator, .titlebar .subtitle, 
GtkCalendar.header .subtitle,
 .header-bar .subtitle {
   opacity: 0.55;
   text-shadow: none; }
@@ -1528,9 +1527,9 @@ GtkComboBox {
     color: #c7c7c7; }
   GtkComboBox .menuitem {
     text-shadow: none; }
-  GtkComboBox .separator, GtkComboBox .sidebar .separator:backdrop, .sidebar GtkComboBox .separator:backdrop,
-  GtkComboBox .sidebar .view .separator:backdrop,
-  .sidebar .view GtkComboBox .separator:backdrop {
+  GtkComboBox .separator, GtkComboBox GtkPlacesSidebar.sidebar .view .separator, GtkPlacesSidebar.sidebar 
.view GtkComboBox .separator,
+  GtkComboBox GtkPlacesSidebar.sidebar .view .separator:backdrop,
+  GtkPlacesSidebar.sidebar .view GtkComboBox .separator:backdrop {
     -GtkWidget-wide-separators: true;
     -GtkWidget-horizontal-separator: 0;
     -GtkWidget-vertical-separator: 0; }
@@ -1596,11 +1595,11 @@ GtkComboBox {
     font-size: smaller;
     padding: 0 12px; }
   .titlebar .header-bar-separator, GtkCalendar.header .header-bar-separator, .titlebar > GtkBox > 
.separator.vertical, GtkCalendar.header > GtkBox > .separator.vertical,
-  .sidebar .view .titlebar > GtkBox > .vertical.separator:backdrop,
-  .sidebar .view GtkCalendar.header > GtkBox > .vertical.separator:backdrop,
+  GtkPlacesSidebar.sidebar .view .titlebar > GtkBox > .vertical.separator:backdrop,
+  GtkPlacesSidebar.sidebar .view GtkCalendar.header > GtkBox > .vertical.separator:backdrop,
   .header-bar .header-bar-separator,
   .header-bar > GtkBox > .separator.vertical,
-  .sidebar .view .header-bar > GtkBox > .vertical.separator:backdrop {
+  GtkPlacesSidebar.sidebar .view .header-bar > GtkBox > .vertical.separator:backdrop {
     -GtkWidget-wide-separators: true;
     -GtkWidget-separator-width: 1px;
     border-width: 0 1px;
@@ -3684,14 +3683,14 @@ GtkProgressBar {
 GtkScrolledWindow GtkViewport.frame {
   border-style: none; }
 
-.separator, .sidebar .separator:backdrop,
-.sidebar .view .separator:backdrop {
+.separator, GtkPlacesSidebar.sidebar .view .separator,
+GtkPlacesSidebar.sidebar .view .separator:backdrop {
   color: rgba(0, 0, 0, 0.1); }
-  GtkFileChooserButton .separator, GtkFileChooserButton .sidebar .separator:backdrop, .sidebar 
GtkFileChooserButton .separator:backdrop,
-  GtkFileChooserButton .sidebar .view .separator:backdrop,
-  .sidebar .view GtkFileChooserButton .separator:backdrop, GtkFontButton .separator, GtkFontButton .sidebar 
.separator:backdrop, .sidebar GtkFontButton .separator:backdrop,
-  GtkFontButton .sidebar .view .separator:backdrop,
-  .sidebar .view GtkFontButton .separator:backdrop {
+  GtkFileChooserButton .separator, GtkFileChooserButton GtkPlacesSidebar.sidebar .view .separator, 
GtkPlacesSidebar.sidebar .view GtkFileChooserButton .separator,
+  GtkFileChooserButton GtkPlacesSidebar.sidebar .view .separator:backdrop,
+  GtkPlacesSidebar.sidebar .view GtkFileChooserButton .separator:backdrop, GtkFontButton .separator, 
GtkFontButton GtkPlacesSidebar.sidebar .view .separator, GtkPlacesSidebar.sidebar .view GtkFontButton 
.separator,
+  GtkFontButton GtkPlacesSidebar.sidebar .view .separator:backdrop,
+  GtkPlacesSidebar.sidebar .view GtkFontButton .separator:backdrop {
     -GtkWidget-wide-separators: true;
     -GtkWidget-horizontal-separator: 0;
     -GtkWidget-vertical-separator: 0; }
@@ -4197,29 +4196,32 @@ GtkFileChooserDialog .dialog-action-box {
 /***********
  * Sidebar *
  ***********/
-.sidebar,
-.sidebar .view {
+.sidebar {
   border: none;
   background-color: #fafafa; }
-  .sidebar .scrollbar.trough,
-  .sidebar .view .scrollbar.trough {
+  .sidebar .scrollbar.trough {
     background-color: lightgray;
     border-radius: 6px;
     border-width: 2px;
     border-color: transparent; }
-  .sidebar .scrollbar.slider,
-  .sidebar .view .scrollbar.slider {
+  .sidebar .scrollbar.slider {
     background-color: #fafafa; }
-    .sidebar .scrollbar.slider:hover,
-    .sidebar .view .scrollbar.slider:hover {
+    .sidebar .scrollbar.slider:hover {
       background-color: white; }
-  .sidebar:backdrop,
-  .sidebar .view:backdrop {
+  .sidebar:backdrop {
     background-color: #fafafa; }
-  .sidebar:selected,
-  .sidebar .view:selected {
+  .sidebar:selected {
     background-color: #4a90d9; }
 
+GtkPlacesSidebar.sidebar .view {
+  color: #2e3436; }
+  GtkPlacesSidebar.sidebar .view:backdrop {
+    color: #8d9091; }
+  GtkPlacesSidebar.sidebar .view:selected {
+    color: #ffffff; }
+    GtkPlacesSidebar.sidebar .view:selected:backdrop {
+      color: white; }
+
 .sidebar-item {
   padding: 10px 4px; }
   .sidebar-item > .label {
@@ -4536,7 +4538,7 @@ GtkCalendar.header .menuitem.titlebutton.button:selected, .list-row:selected {
    ----------------
    use responsibly! */
 /*
-widget text/foregroung color */
+widget text/foreground color */
 @define-color theme_fg_color #2e3436;
 /*
 text color for entries, views and content in general */


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