[gnome-themes-standard] Widget theme: new scrollbar design.
- From: Lapo Calamandrei <lapo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-themes-standard] Widget theme: new scrollbar design.
- Date: Wed, 21 Dec 2011 14:40:41 +0000 (UTC)
commit 9b60594e41516850583c57cb0a37a5c28d20a1a7
Author: Lapo Calamandrei <calamandrei gmail com>
Date: Wed Dec 21 15:40:22 2011 +0100
Widget theme: new scrollbar design.
themes/Adwaita/gtk-3.0/Makefile.am | 1 -
themes/Adwaita/gtk-3.0/gtk-dark.css | 7 +-
.../Adwaita/gtk-3.0/gtk-scrollbar-experiments.css | 46 ---------
.../Adwaita/gtk-3.0/gtk-widgets-dark-overrides.css | 6 -
themes/Adwaita/gtk-3.0/gtk-widgets.css | 103 ++++++-------------
themes/Adwaita/gtk-3.0/gtk.css | 8 +-
6 files changed, 45 insertions(+), 126 deletions(-)
---
diff --git a/themes/Adwaita/gtk-3.0/Makefile.am b/themes/Adwaita/gtk-3.0/Makefile.am
index aa29e7d..f2c7a75 100644
--- a/themes/Adwaita/gtk-3.0/Makefile.am
+++ b/themes/Adwaita/gtk-3.0/Makefile.am
@@ -5,7 +5,6 @@ theme_DATA = \
gnome-applications.css \
gtk.css \
gtk-dark.css \
- gtk-scrollbar-experiments.css \
gtk-widgets.css \
gtk-widgets-backgrounds.css \
gtk-widgets-borders.css \
diff --git a/themes/Adwaita/gtk-3.0/gtk-dark.css b/themes/Adwaita/gtk-3.0/gtk-dark.css
index f756a10..cff0fd4 100644
--- a/themes/Adwaita/gtk-3.0/gtk-dark.css
+++ b/themes/Adwaita/gtk-3.0/gtk-dark.css
@@ -120,7 +120,12 @@
@define-color trough_bg_color_a #30312f;
@define-color trough_bg_color_b #41433f;
- define-color scrollbar_trough_color #414141;
+ define-color scrollbar_trough shade(@theme_bg_color, 1.2);
+ define-color scrollbar_trough_insensitive shade(@theme_bg_color, 1.05); /* FIXME */
+ define-color scrollbar_slider mix(@scrollbar_trough, @theme_fg_color, 0.15);
+ define-color scrollbar_slider_prelight mix(@scrollbar_trough, @theme_fg_color, 0.3);
+ define-color scrollbar_slider_active @theme_selected_bg_color;
+ define-color scrollbar_slider_insensitive @insensitive_bg_color; /* FIXME */
@define-color treeview_focus_border shade (@theme_selected_bg_color, 1.20);
diff --git a/themes/Adwaita/gtk-3.0/gtk-widgets-dark-overrides.css b/themes/Adwaita/gtk-3.0/gtk-widgets-dark-overrides.css
index f5a3965..977c670 100644
--- a/themes/Adwaita/gtk-3.0/gtk-widgets-dark-overrides.css
+++ b/themes/Adwaita/gtk-3.0/gtk-widgets-dark-overrides.css
@@ -80,12 +80,6 @@ column-header .button {
color: alpha (@theme_text_color, 0.1);
}
-.scrollbar.slider:prelight,
-.scrollbar.button:prelight,
-.scrollbar.button:prelight:active {
- border-color: shade (@highlighted_border, 0.75);
-}
-
GtkScale.trough:insensitive:window-unfocused { /* not working */
background-color: transparent;
}
diff --git a/themes/Adwaita/gtk-3.0/gtk-widgets.css b/themes/Adwaita/gtk-3.0/gtk-widgets.css
index eb94c8e..904e309 100644
--- a/themes/Adwaita/gtk-3.0/gtk-widgets.css
+++ b/themes/Adwaita/gtk-3.0/gtk-widgets.css
@@ -1237,103 +1237,66 @@ GtkComboBox .button *:hover {
.scrollbar {
background-image: none;
border-style: solid;
- -GtkRange-trough-border: 2;
- -GtkRange-arrow-scaling: 0.444;
- -GtkRange-slider-width: 18;
- -GtkRange-stepper-size: 18;
- -GtkScrollbar-min-slider-length: 30; /* minimum size for the slider. sadly can't be in '.slider' where it belongs */
+ -GtkRange-trough-border: 0;
+ -GtkScrollbar-has-backward-stepper: false;
+ -GtkScrollbar-has-forward-stepper: false;
+ -GtkRange-slider-width: 11;
+ -GtkScrollbar-min-slider-length: 7; /* minimum size for the slider. sadly can't be in '.slider' where it belongs */
- -GtkRange-stepper-spacing: 1;
+ -GtkRange-stepper-spacing: 0;
-GtkRange-trough-under-steppers: 1;
}
.scrollbar.trough {
background-image: none;
- background-color: @scrollbar_trough_color;
+ background-color: @scrollbar_trough;
border-width: 0;
border-radius: 0;
border-image: none;
}
-.scrollbar.trough:insensitive {
- background-color: shade (@theme_bg_color, 0.882);
-}
-
-.scrollbar.trough:window-unfocused {
- background-color: mix(@theme_unfocused_bg_color, @unfocused_borders, 0.3);
-
- /* FIXME - all those values should be inherited */
+.scrollbar.slider {
background-image: none;
- border-width: 0;
- border-radius: 0;
- border-image: none;
-}
-
-.scrollbar.slider,
-.scrollbar.button,
-.scrollbar.slider:window-unfocused,
-.scrollbar.button:window-unfocused {
- background-image: none;
- border-radius: 3;
- border-width: 1;
+ background-color: @scrollbar_slider;
+ border-radius: 10;
+ border-style: solid;
border-image: none;
-}
-
-.scrollbar.slider,
-.scrollbar.button {
- background-color: @theme_base_color;
- border-color: @borders;
+ border-color: transparent;
+ border-width: 2;
}
.scrollbar.slider:hover {
background-image: none;
- background-color: @theme_base_color;
- border-color: shade (@highlighted_border, 0.964);
+ background-color: @scrollbar_slider_prelight;
+ border-style: solid;
+ border-image: none;
+ border-color: transparent;
+ border-width: 2;
}
-.scrollbar.slider:hover:active {
+.scrollbar.slider:prelight:active {
background-image: none;
- background-color: @theme_base_color;
- border-color: @theme_selected_bg_color;
+ background-color: @scrollbar_slider_active;
+ border-style: solid;
+ border-image: none;
+ border-color: transparent;
+ border-width: 2;
}
.scrollbar.slider:insensitive {
- background-color: @theme_base_color;
-}
-
-.scrollbar.button {
- color: @internal_element_color;
-}
-
-.scrollbar.button:hover,
-.scrollbar.button:hover:active {
- background-image: none;
- background-color: @theme_base_color;
-
+ background-color: @scrollbar_slider_insensitive;
+ border-style: solid;
border-image: none;
- border-color: shade (@highlighted_border, 0.964);
- border-width: 1;
+ border-color: transparent;
+ border-width: 2;
}
-.scrollbar.button:insensitive {
- background-image: none;
- background-color: @theme_base_color;
- color: @internal_element_insensitive;
-
+.scrollbar.trough:insensitive {
+ background-color: @scrollbar_trough_insensitive;
+ border-style: solid;
border-image: none;
- border-color: @borders;
- border-width: 1;
-}
-
-.scrollbar.slider:window-unfocused,
-.scrollbar.button:window-unfocused,
-.scrollbar.button:insensitive:window-unfocused {
- background-color: @theme_unfocused_base_color;
- border-color: @unfocused_borders;
-}
-
-.scrollbar.button:insensitive:window-unfocused {
- color: @internal_element_insensitive;
+ border-color: transparent;
+ border-width: 2;
}
/*********
diff --git a/themes/Adwaita/gtk-3.0/gtk.css b/themes/Adwaita/gtk-3.0/gtk.css
index 4ae82c4..0fb2054 100644
--- a/themes/Adwaita/gtk-3.0/gtk.css
+++ b/themes/Adwaita/gtk-3.0/gtk.css
@@ -103,7 +103,12 @@
@define-color trough_bg_color_a #bcbcb7;
@define-color trough_bg_color_b #e0e0dd;
- define-color scrollbar_trough_color shade(@theme_bg_color, 0.882);
+ define-color scrollbar_trough shade(@theme_bg_color, 0.9);
+ define-color scrollbar_trough_insensitive shade(@theme_bg_color, 0.95);
+ define-color scrollbar_slider mix(@scrollbar_trough, @theme_fg_color, 0.3);
+ define-color scrollbar_slider_prelight mix(@scrollbar_trough, @theme_fg_color, 0.5);
+ define-color scrollbar_slider_active @theme_selected_bg_color;
+ define-color scrollbar_slider_insensitive @insensitive_bg_color; /* FIXME */
@define-color switch_slider_color #eeeeec;
@define-color switch_slider_active_border #2a79cb;
@@ -189,4 +194,3 @@
@import url("gtk-widgets-assets.css");
@import url("gtk-widgets.css");
@import url("gnome-applications.css");
-/* @import url("gtk-scrollbar-experiments.css"); */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]