[gnome-themes-standard] Widget theme: Switch styling refresh and some additional work on the unfocused window state.
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-themes-standard] Widget theme: Switch styling refresh and some additional work on the unfocused window state.
- Date: Thu, 1 Dec 2011 02:29:25 +0000 (UTC)
commit e58cc0043c3acf92b679b72c8d383a6858f8881c
Author: Lapo Calamandrei <calamandrei gmail com>
Date: Sun Nov 20 21:47:11 2011 +0100
Widget theme: Switch styling refresh and some additional work on the unfocused window state.
themes/Adwaita/gtk-3.0/gtk-widgets-backgrounds.css | 18 +++++++-
themes/Adwaita/gtk-3.0/gtk-widgets-borders.css | 19 ++++++---
themes/Adwaita/gtk-3.0/gtk-widgets.css | 40 +++++++++-----------
themes/Adwaita/gtk-3.0/gtk.css | 4 +-
4 files changed, 47 insertions(+), 34 deletions(-)
---
diff --git a/themes/Adwaita/gtk-3.0/gtk-widgets-backgrounds.css b/themes/Adwaita/gtk-3.0/gtk-widgets-backgrounds.css
index 9e10969..58fd9aa 100644
--- a/themes/Adwaita/gtk-3.0/gtk-widgets-backgrounds.css
+++ b/themes/Adwaita/gtk-3.0/gtk-widgets-backgrounds.css
@@ -39,7 +39,8 @@
.button:hover:active,
.toolbar .button:active,
.toolbar .button:hover:active,
-.primary-toolbar .button:active:focus {
+.primary-toolbar .button:active:focus,
+GtkSwitch.trough {
background-image: -gtk-gradient (linear,
left top, left bottom,
from (@button_active_gradient_color_a),
@@ -117,7 +118,9 @@ GtkComboBox.combobox-entry .button:focus,
/* Entry background for :window-unfocused */
.entry:window-unfocused,
GtkComboBox.combobox-entry .button:window-unfocused
-.primary-toolbar GtkComboBox.combobox-entry .button:window-unfocused {
+.primary-toolbar GtkComboBox.combobox-entry .button:window-unfocused,
+GtkSwitch.trough:window-unfocused,
+GtkSwitch.trough:active:window-unfocused {
background-image: none;
background-color: @theme_base_color;
}
@@ -137,7 +140,8 @@ GtkComboBox.combobox-entry .button:hover:active {
/* Insensitive entry background */
.entry:insensitive,
-GtkComboBox.combobox-entry .button:insensitive {
+GtkComboBox.combobox-entry .button:insensitive,
+.entry:insensitive:window-unfocused {
background-color: @insensitive_bg_color;
background-image: none;
}
@@ -161,3 +165,11 @@ GtkComboBox.combobox-entry .button:insensitive {
background-image: none;
background-color: @theme_unfocused_toolbar_color;
}
+
+/* Active switch background*/
+GtkSwitch.trough:active {
+ background-image: -gtk-gradient (linear,
+ left top, left bottom,
+ from (@switch_trough_active_bg_a),
+ to (@switch_trough_active_bg_b));
+}
diff --git a/themes/Adwaita/gtk-3.0/gtk-widgets-borders.css b/themes/Adwaita/gtk-3.0/gtk-widgets-borders.css
index d990c97..5617507 100644
--- a/themes/Adwaita/gtk-3.0/gtk-widgets-borders.css
+++ b/themes/Adwaita/gtk-3.0/gtk-widgets-borders.css
@@ -7,7 +7,9 @@ GtkComboBox.combobox-entry .button,
GtkComboBox.combobox-entry .button:focus,
.button:active,
.button:active:hover,
-.button:insensitive {
+.button:insensitive,
+GtkSwitch.trough,
+GtkSwitch.trough:insensitive {
border-image: url("borders/generic-border.svg") 3 3 4 3 / 3 3 4 3 stretch;
border-radius: 3;
border-width: 1 1 2 1;
@@ -17,7 +19,8 @@ GtkComboBox.combobox-entry .button:focus,
.entry:focus,
GtkComboBox.combobox-entry .entry:focus,
.button:focus:active,
-.button.default:active {
+.button.default:active,
+GtkSwitch.trough:active {
border-image: url("borders/generic-border-focused.svg") 3 3 4 3 / 3 3 4 3 stretch;
border-radius: 3;
border-width: 1 1 2 1;
@@ -110,7 +113,7 @@ GtkComboBox.combobox-entry .entry:focus,
}
GtkScale.trough,
-GtkSwitch.trough,
+/*GtkSwitch.trough,*/
GtkScale.trough.horizontal {
border-image: url("assets/trough-border-horizontal.svg") 2 / 2 stretch;
}
@@ -119,7 +122,7 @@ GtkScale.trough.vertical {
border-image: url("assets/trough-border-vertical.svg") 2 / 2 stretch;
}
-GtkSwitch.trough:active,
+/*GtkSwitch.trough:active,*/
GtkScale.progressbar.horizontal {
border-image: url("assets/trough-active-border-horizontal.svg") 2 / 2 stretch;
}
@@ -128,13 +131,13 @@ GtkScale.progressbar.vertical {
border-image: url("assets/trough-active-border-vertical.svg") 2 / 2 stretch;
}
-GtkSwitch.slider {
+/*GtkSwitch.slider {
border-image: url("assets/switch-slider-border.svg") 2 / 2 stretch;
}
GtkSwitch.slider:active {
border-image: url("assets/switch-slider-active-border.svg") 2 / 2 stretch;
-}
+}*/
.progressbar,
.entry.progressbar,
@@ -160,7 +163,9 @@ GtkComboBox.combobox-entry .button:window-unfocused,
.button:active:hover:window-unfocused,
.button:insensitive:window-unfocused,
.primary-toolbar .raised .button:window-unfocused,
-GtkComboBox:window-unfocused {
+GtkComboBox .button:window-unfocused,
+GtkSwitch.through:window-unfocused,
+GtkSwitch.through:active:window-unfocused {
border-image: none;
border-width: 1;
border-style: solid;
diff --git a/themes/Adwaita/gtk-3.0/gtk-widgets.css b/themes/Adwaita/gtk-3.0/gtk-widgets.css
index 33eafc7..0f1be2a 100644
--- a/themes/Adwaita/gtk-3.0/gtk-widgets.css
+++ b/themes/Adwaita/gtk-3.0/gtk-widgets.css
@@ -52,13 +52,20 @@ GtkWindow {
GtkWindow:window-unfocused {
background-color: @theme_unfocused_bg_color;
- color: red; /* This is very needed */
}
* {
background-color: @theme_bg_color;
}
+*:window-unfocused {
+ color: @insensitive_fg_color;
+}
+
+*:insensitive:window-unfocused {
+ color: mix (@theme_unfocused_bg_color, @insensitive_fg_color, 0.5);
+}
+
*:hover {
background-color: shade (@theme_bg_color, 1.02);
color: @theme_fg_color;
@@ -1295,44 +1302,28 @@ GtkSwitch {
}
GtkSwitch.trough {
- color: shade (@internal_element_color, 0.60);
-
- border-radius: 1;
- border-width: 1;
- border-style: none;
- /* border-image defined in the -assets variant */
-
- background-image: -gtk-gradient (linear,
- left top, left bottom,
- from (@trough_bg_color_a),
- to (@trough_bg_color_b));
+ border-radius: 3;
+ border-width: 1 1 2 1;
}
GtkSwitch.trough:active {
color: @switch_trough_active_color;
- background-image: -gtk-gradient (linear,
- left top, left bottom,
- from (@switch_trough_active_bg_a),
- to (@switch_trough_active_bg_b));
}
GtkSwitch.trough:insensitive {
background-image: none;
background-color: shade (@theme_bg_color, 0.9);
-
- border-image: none;
- border-style: solid;
}
GtkSwitch.slider {
border-width: 1;
- border-radius: 1;
+ border-radius: 2;
border-style: solid;
- border-color: shade(@switch_slider_color, 0.75);
+ border-color: mix (@button_border, @theme_text_color, 0.5);
box-shadow: 0 -1 inset alpha(@theme_base_color, 0.50);
- padding: 2;
+ padding: 2 2 3 2;
background-image: -gtk-gradient (linear,
left top, left bottom,
@@ -1342,6 +1333,11 @@ GtkSwitch.slider {
-adwaita-switch-grip-color: shade (@switch_slider_color, 0.97);
}
+GtkSwitch.slider:window-unfocused,
+GtkSwitch.slider:active:window-unfocused {
+ border-color: @theme_unfocused_button_active_color;;
+}
+
GtkSwitch.slider:active {
border-color: @switch_slider_active_border;
}
diff --git a/themes/Adwaita/gtk-3.0/gtk.css b/themes/Adwaita/gtk-3.0/gtk.css
index 07ed992..1c53b1d 100644
--- a/themes/Adwaita/gtk-3.0/gtk.css
+++ b/themes/Adwaita/gtk-3.0/gtk.css
@@ -13,7 +13,7 @@
/* Colormap actually used by the theme, to be overridden in other css files */
@define-color theme_base_color @base_color;
@define-color theme_text_color @text_color;
- define-color theme_unfocused_text_color shade(@text_color, 1.2);
+ define-color theme_unfocused_text_color shade(@text_color, 1.4);
@define-color theme_bg_color @bg_color;
@define-color theme_fg_color @fg_color;
@define-color theme_tooltip_bg_color @tooltip_bg_color;
@@ -89,7 +89,7 @@
@define-color switch_trough_active_color @theme_base_color;
@define-color switch_trough_active_bg_a #509ae7;
- define-color switch_trough_active_bg_b #84b8ee;
+ define-color switch_trough_active_bg_b #a5d0ff;
@define-color progressbar_background_a #76b0ec;
@define-color progressbar_background_b #1f72c6;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]