From c541e47c5e1a15b80e8db0007f98e4c0d149552f Mon Sep 17 00:00:00 2001 From: Lapo Calamandrei Date: Thu, 3 Jul 2014 10:30:14 +0200 Subject: [PATCH] Adwaita: style progressbars in treeview cells. Fixes https://bugzilla.gnome.org/show_bug.cgi?id=732298 --- gtk/resources/theme/Adwaita/_common.scss | 34 +++++++++++++++++-- .../theme/Adwaita/gtk-contained-dark.css | 19 +++++++++-- gtk/resources/theme/Adwaita/gtk-contained.css | 15 ++++++++ 3 files changed, 63 insertions(+), 5 deletions(-) diff --git a/gtk/resources/theme/Adwaita/_common.scss b/gtk/resources/theme/Adwaita/_common.scss index 97d8a8a911..dbbda8c5d4 100644 --- a/gtk/resources/theme/Adwaita/_common.scss +++ b/gtk/resources/theme/Adwaita/_common.scss @@ -765,6 +765,31 @@ column-header { } } } +GtkTreeView.view.progressbar { //Progressbar in treeview cells + @if $variant == 'light' { color: $base_color; } + border-radius: 4px; + background-image: linear-gradient(to bottom, + $selected_bg_color, + darken($selected_bg_color,10%)); + &:selected { + @if $variant == 'light' { color: $selected_bg_color; } + @else { border-color: $selected_bg_color; } + background-image: linear-gradient(to bottom, + $base_color, + darken($base_color,10%)); + &:backdrop { + @if $variant == 'light' { color: $selected_bg_color; } + @else { border-color: $selected_bg_color; } + background-image: none; + background-color: $backdrop_base_color; + } + } + &:backdrop { + @if $variant == 'light' { color: $backdrop_base_color; } + @else { border-color: $backdrop_base_color; } + background-image: none; + } +} /********* * Menus * @@ -1637,8 +1662,13 @@ GtkLevelBar.vertical { %selected_items { background-color: $selected_bg_color; color: $selected_fg_color; - outline-color: transparentize($selected_fg_color, 0.7); - &:backdrop { color: $backdrop_base_color; } + @if $variant == 'light' { + outline-color: transparentize($selected_fg_color, 0.7); + } + &:backdrop { + @if $variant == 'light' { color: $backdrop_base_color; } + @else { color: $backdrop_fg_color; }; + } } /********** diff --git a/gtk/resources/theme/Adwaita/gtk-contained-dark.css b/gtk/resources/theme/Adwaita/gtk-contained-dark.css index 554f059d82..7b80b05dc9 100644 --- a/gtk/resources/theme/Adwaita/gtk-contained-dark.css +++ b/gtk/resources/theme/Adwaita/gtk-contained-dark.css @@ -985,6 +985,20 @@ column-header .button, column-header .button:hover, column-header .button:active border-color: #393f3f; background-image: none; } +GtkTreeView.view.progressbar { + border-radius: 4px; + background-image: linear-gradient(to bottom, #215d9c, #184472); } + GtkTreeView.view.progressbar:selected { + border-color: #215d9c; + background-image: linear-gradient(to bottom, #292929, #101010); } + GtkTreeView.view.progressbar:selected:backdrop { + border-color: #215d9c; + background-image: none; + background-color: #2c2c2c; } + GtkTreeView.view.progressbar:backdrop { + border-color: #2c2c2c; + background-image: none; } + /********* * Menus * *********/ @@ -2244,10 +2258,9 @@ GtkLevelBar.vertical { .view:selected, .view:selected:focus, .view:selected:hover, GtkLabel:selected, GtkLabel:selected:focus, GtkLabel:selected:hover, GtkLabel:backdrop:selected, .entry:selected, .entry:selected:focus, .menuitem.button.flat:selected { background-color: #215d9c; - color: white; - outline-color: rgba(255, 255, 255, 0.3); } + color: white; } .view:backdrop:selected, GtkLabel:backdrop:selected, .entry:backdrop:selected, .menuitem.button.flat:backdrop:selected { - color: #2c2c2c; } + color: #c9cbc9; } /********** * Frames * diff --git a/gtk/resources/theme/Adwaita/gtk-contained.css b/gtk/resources/theme/Adwaita/gtk-contained.css index 9e65cccab8..d0769a4ede 100644 --- a/gtk/resources/theme/Adwaita/gtk-contained.css +++ b/gtk/resources/theme/Adwaita/gtk-contained.css @@ -985,6 +985,21 @@ column-header .button, column-header .button:hover, column-header .button:active border-color: #ededed; background-image: none; } +GtkTreeView.view.progressbar { + color: white; + border-radius: 4px; + background-image: linear-gradient(to bottom, #4a90d9, #2a76c6); } + GtkTreeView.view.progressbar:selected { + color: #4a90d9; + background-image: linear-gradient(to bottom, white, #e6e6e6); } + GtkTreeView.view.progressbar:selected:backdrop { + color: #4a90d9; + background-image: none; + background-color: #fcfcfc; } + GtkTreeView.view.progressbar:backdrop { + color: #fcfcfc; + background-image: none; } + /********* * Menus * *********/