[gnome-themes-standard] Widget theme: some initial window-unfocused work.
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-themes-standard] Widget theme: some initial window-unfocused work.
- Date: Thu, 1 Dec 2011 02:29:15 +0000 (UTC)
commit f68699d475d5e312b5f5fe22591b0416e60272e2
Author: Lapo Calamandrei <calamandrei gmail com>
Date: Sun Nov 20 13:05:50 2011 +0100
Widget theme: some initial window-unfocused work.
themes/Adwaita/gtk-3.0/gtk-widgets-backgrounds.css | 53 +++++++++++++++++
themes/Adwaita/gtk-3.0/gtk-widgets-borders.css | 61 ++++++++++++++++++++
themes/Adwaita/gtk-3.0/gtk-widgets.css | 28 +++------
themes/Adwaita/gtk-3.0/gtk.css | 6 ++
4 files changed, 130 insertions(+), 18 deletions(-)
---
diff --git a/themes/Adwaita/gtk-3.0/gtk-widgets-backgrounds.css b/themes/Adwaita/gtk-3.0/gtk-widgets-backgrounds.css
index 981ba90..9e44883 100644
--- a/themes/Adwaita/gtk-3.0/gtk-widgets-backgrounds.css
+++ b/themes/Adwaita/gtk-3.0/gtk-widgets-backgrounds.css
@@ -12,6 +12,28 @@
to (@button_gradient_color_b));
}
+/* Button background :window-unfocused */
+.button:window-unfocused,
+.primary-toolbar .button.raised:window-unfocused,
+.primary-toolbar .raised .button:window-unfocused {
+ background-image: none;
+ background-color: @theme_unfocused_bg_color;
+}
+
+/* Primary toolbar button background :window-unfocused */
+.primary-toolbar .button:window-unfocused,
+.primary-toolbar .button:hover:window-unfocused {
+ background-image: none;
+ background-color: transparent;
+}
+
+/* Button background :hover :window-unfocused */
+.primary-toolbar .button.raised:hover:window-unfocused,
+.primary-toolbar .raised .button:hover:window-unfocused {
+ background-image: none;
+ background-color: shade(@theme_unfocused_bg_color, 1.2);
+}
+
/* Pushed button background */
.button:active,
.button:hover:active,
@@ -24,6 +46,16 @@
to (alpha (@button_active_gradient_color_b, 0.13)));
}
+/* Pushed buttons background for window unfocused state */
+.button:active:window-unfocused,
+.button:hover:active:window-unfocused,
+.toolbar .button:active:window-unfocused,
+.toolbar .button:hover:active:window-unfocused,
+.primary-toolbar .button:active:window-unfocused {
+ background-image: none;
+ background-color: @theme_unfocused_button_active_color;
+}
+
/* Prelit button background */
.button:hover,
.toolbar .button:hover,
@@ -101,3 +133,24 @@ GtkComboBox.combobox-entry .button:insensitive {
background-color: @insensitive_bg_color;
background-image: none;
}
+
+/* Primary and inline toolbars background */
+
+.primary-toolbar .toolbar,
+.primary-toolbar.toolbar,
+.inline-toolbar.toolbar {
+ background-image: -gtk-gradient (linear,
+ left top,
+ left bottom,
+ from (@toolbar_gradient_base),
+ color-stop (0.16, @toolbar_gradient_step1),
+ color-stop (0.90, @toolbar_gradient_step2),
+ to (@toolbar_gradient_final));
+}
+
+.primary-toolbar .toolbar:window-unfocused,
+.primary-toolbar.toolbar:window-unfocused,
+.inline-toolbar.toolbar:window-unfocused {
+ background-image: none;
+ background-color: @theme_unfocused_toolbar_color;
+}
diff --git a/themes/Adwaita/gtk-3.0/gtk-widgets-borders.css b/themes/Adwaita/gtk-3.0/gtk-widgets-borders.css
index a1d9d84..aa4ee84 100644
--- a/themes/Adwaita/gtk-3.0/gtk-widgets-borders.css
+++ b/themes/Adwaita/gtk-3.0/gtk-widgets-borders.css
@@ -38,6 +38,25 @@ GtkComboBox.combobox-entry .entry:focus,
border-width: 1 1 2 1;
}
+/* buttons border for window unfocused state*/
+
+.primary-toolbar .raised .button:window-unfocused {
+ border-width: 1;
+ border-style: solid;
+ /*border-color: @theme_unfocused_border_color;*/
+ border-color: @theme_unfocused_button_active_color;
+ border-radius: 3;
+}
+
+.primary-toolbar .button:active:window-unfocused,
+.primary-toolbar .raised .button:active:window-unfocused {
+ border-width: 1;
+ border-style: solid;
+ border-color: @theme_unfocused_border_color;
+ border-radius: 3;
+}
+
+
/* primary toolbar - generic element borders */
.primary-toolbar .entry,
.primary-toolbar GtkComboBox.combobox-entry .entry,
@@ -59,6 +78,27 @@ GtkComboBox.combobox-entry .entry:focus,
border-width: 2;
}
+/* primary toolbar - generic element borders for window unfocused state */
+.primary-toolbar .entry:window-unfocused,
+.primary-toolbar GtkComboBox.combobox-entry .entry:window-unfocused,
+.primary-toolbar GtkComboBox.combobox-entry .button:window-unfocused,
+.primary-toolbar GtkComboBox.combobox-entry .button:prelight:window-unfocused,
+.primary-toolbar GtkComboBox.combobox-entry .button:active:window-unfocused,
+.primary-toolbar GtkComboBox.combobox-entry .button:focus:window-unfocused,
+.primary-toolbar GtkComboBox.combobox-entry .button:insensitive:window-unfocused,
+.primary-toolbar .raised .button:window-unfocused,
+.primary-toolbar .button:active:window-unfocused,
+.primary-toolbar .button:active:hover:window-unfocused,
+.primary-toolbar .button.raised:insensitive:window-unfocused,
+.primary-toolbar .raised .button:insensitive:window-unfocused,
+.primary-toolbar .raised .button:window-unfocused,
+.inline-toolbar.toolbar .button:active:window-unfocused,
+.inline-toolbar.toolbar .button:active:hover:window-unfocused,
+.inline-toolbar.toolbar .button:insensitive:window-unfocused,
+.inline-toolbar.toolbar GtkToolButton .button:active:window-unfocused {
+ border-image: none;
+}
+
/* primary toolbar - focused element borders */
.primary-toolbar .entry:focus,
.primary-toolbar GtkComboBox.combobox-entry .entry:focus,
@@ -139,3 +179,24 @@ GtkSwitch.slider:active {
.progressbar.vertical {
border-image: url("assets/progressbar-border-vertical.svg") 3 / 3 stretch;
}
+
+/* border image removal for window unfocued stuf */
+.primary-toolbar .entry:window-unfocused,
+.primary-toolbar GtkComboBox.combobox-entry .entry:window-unfocused,
+.primary-toolbar GtkComboBox.combobox-entry .button:window-unfocused,
+.primary-toolbar GtkComboBox.combobox-entry .button:prelight:window-unfocused,
+.primary-toolbar GtkComboBox.combobox-entry .button:active:window-unfocused,
+.primary-toolbar GtkComboBox.combobox-entry .button:focus:window-unfocused,
+.primary-toolbar GtkComboBox.combobox-entry .button:insensitive:window-unfocused,
+.primary-toolbar .raised .button:window-unfocused,
+.primary-toolbar .button:active:window-unfocused,
+.primary-toolbar .button:active:hover:window-unfocused,
+.primary-toolbar .button.raised:insensitive:window-unfocused,
+.primary-toolbar .raised .button:insensitive:window-unfocused,
+.primary-toolbar .raised .button:window-unfocused,
+.inline-toolbar.toolbar .button:active:window-unfocused,
+.inline-toolbar.toolbar .button:active:hover:window-unfocused,
+.inline-toolbar.toolbar .button:insensitive:window-unfocused,
+.inline-toolbar.toolbar GtkToolButton .button:active:window-unfocused {
+ border-image: none;
+}
diff --git a/themes/Adwaita/gtk-3.0/gtk-widgets.css b/themes/Adwaita/gtk-3.0/gtk-widgets.css
index f4eb6a4..acb263d 100644
--- a/themes/Adwaita/gtk-3.0/gtk-widgets.css
+++ b/themes/Adwaita/gtk-3.0/gtk-widgets.css
@@ -50,6 +50,11 @@ GtkWindow {
color: @theme_fg_color;
}
+GtkWindow:window-unfocused {
+ background-color: @theme_unfocused_bg_color;
+ color: red; /* This is very needed */
+}
+
* {
background-color: @theme_bg_color;
}
@@ -1159,14 +1164,6 @@ GtkTreeMenu .menuitem * {
*/
.primary-toolbar .toolbar,
.primary-toolbar.toolbar {
- background-image: -gtk-gradient (linear,
- left top,
- left bottom,
- from (@toolbar_gradient_base),
- color-stop (0.16, @toolbar_gradient_step1),
- color-stop (0.90, @toolbar_gradient_step2),
- to (@toolbar_gradient_final));
-
border-width: 1 0 1 0;
border-radius: 0;
border-style: solid;
@@ -1177,6 +1174,11 @@ GtkTreeMenu .menuitem * {
-GtkToolbar-button-relief: normal;
}
+.primary-toolbar .toolbar:window-unfocused,
+.primary-toolbar.toolbar:window-unfocused {
+ border-color: @theme_unfocused_toolbar_color;
+}
+
.primary-toolbar .toolbar:insensitive,
.primary-toolbar.toolbar:insensitive {
background-image: none;
@@ -1216,16 +1218,6 @@ GtkTreeMenu .menuitem * {
-GtkToolbar-button-relief: normal;
padding: 4;
-
- background-image: -gtk-gradient (linear,
- left top,
- left bottom,
- from (@toolbar_gradient_base),
- color-stop (0.16, @toolbar_gradient_step1),
- color-stop (0.90, @toolbar_gradient_step2),
- color-stop (0.98, @toolbar_gradient_final),
- color-stop (0.99, shade (@theme_bg_color, 0.83)),
- to (shade (@theme_bg_color, 0.83)));
}
.inline-toolbar.toolbar:last-child {
diff --git a/themes/Adwaita/gtk-3.0/gtk.css b/themes/Adwaita/gtk-3.0/gtk.css
index 10455c3..cc49ad2 100644
--- a/themes/Adwaita/gtk-3.0/gtk.css
+++ b/themes/Adwaita/gtk-3.0/gtk.css
@@ -11,6 +11,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_bg_color @bg_color;
@define-color theme_fg_color @fg_color;
@define-color theme_tooltip_bg_color @tooltip_bg_color;
@@ -61,6 +62,8 @@
@define-color button_active_gradient_color_a #a2a9a2;
@define-color button_active_gradient_color_b shade (@button_active_gradient_color_a, 0.83);
+ define-color theme_unfocused_button_active_color shade(@theme_unfocused_bg_color, 0.8); /* to be defined */
+
@define-color button_hover_gradient_color_a @theme_base_color;
@define-color button_hover_gradient_color_b shade (@button_gradient_color_a, 0.94);
@@ -122,6 +125,9 @@
@define-color toolbar_gradient_step2 #d9d9d7;
@define-color toolbar_gradient_final #e5e5e2;
+ define-color theme_unfocused_toolbar_color shade(@theme_unfocused_bg_color, 0.9);
+ define-color theme_unfocused_border_color shade(@theme_unfocused_bg_color, 0.9);
+
@define-color toolbar_border_top shade (@theme_bg_color, 0.56);
@define-color toolbar_border_bottom shade (@theme_bg_color, 0.83);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]