[gnome-themes-standard] Widget theme: getting there with the unfocused window styling, still some issues here and there.
- From: Lapo Calamandrei <lapo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-themes-standard] Widget theme: getting there with the unfocused window styling, still some issues here and there.
- Date: Thu, 8 Dec 2011 12:24:32 +0000 (UTC)
commit bc89295e44ecc1c6dd01adf0944c37cc8ba14805
Author: Lapo Calamandrei <calamandrei gmail com>
Date: Thu Dec 8 13:22:40 2011 +0100
Widget theme: getting there with the unfocused window styling, still some issues here and there.
themes/Adwaita/gtk-3.0/gtk-backgrounds.css | 6 ++
themes/Adwaita/gtk-3.0/gtk-dark.css | 11 +++
themes/Adwaita/gtk-3.0/gtk-widgets-backgrounds.css | 62 +++++++++++++
themes/Adwaita/gtk-3.0/gtk-widgets-borders.css | 12 +--
themes/Adwaita/gtk-3.0/gtk-widgets.css | 95 +++++++++++++++++++-
themes/Adwaita/gtk-3.0/gtk.css | 10 ++-
6 files changed, 183 insertions(+), 13 deletions(-)
---
diff --git a/themes/Adwaita/gtk-3.0/gtk-backgrounds.css b/themes/Adwaita/gtk-3.0/gtk-backgrounds.css
index 36ef70f..dc66082 100644
--- a/themes/Adwaita/gtk-3.0/gtk-backgrounds.css
+++ b/themes/Adwaita/gtk-3.0/gtk-backgrounds.css
@@ -36,6 +36,12 @@ background-color: red;
to (shade (@insensitive_bg_color, 0.9))); */
}
+/* Unfocused window button background */
+.button:window-unfocused {
+ background-image: none;
+ background-color: @unfocused_button_background;
+}
+
/* Entry background */
.entry,
GtkComboBox.combobox-entry .button,
diff --git a/themes/Adwaita/gtk-3.0/gtk-dark.css b/themes/Adwaita/gtk-3.0/gtk-dark.css
index 3dd7660..771e178 100644
--- a/themes/Adwaita/gtk-3.0/gtk-dark.css
+++ b/themes/Adwaita/gtk-3.0/gtk-dark.css
@@ -9,6 +9,17 @@
@define-color placeholder_text_color shade(@theme_text_color, 0.4);
+ define-color theme_unfocused_base_color shade(@insensitive_bg_color, 1.05);
+ define-color theme_unfocused_text_color @button_border;
+ define-color theme_unfocused_fg_color @button_border;
+ define-color theme_unfocused_bg_color @theme_bg_color; /* FIXME */
+ define-color theme_unfocused_selected_bg_color @theme_selected_bg_color; /* FIXME */
+ define-color theme_unfocused_selected_fg_color @theme_selected_fg_color; /* FIXME */
+ define-color unfocused_button_background @theme_unfocused_bg_color;
+ define-color unfocused_borders_color @button_border;
+ define-color unfocused_insensitive_bg_color mix(@theme_bg_color, @theme_unfocused_base_color, 0.5);
+ define-color unfocused_toolbar mix(@theme_unfocused_bg_color, @unfocused_borders_color, 0.5);
+
@define-color menu_bg_color #555753;
@define-color menu_fg_color @theme_text_color;
diff --git a/themes/Adwaita/gtk-3.0/gtk-widgets-backgrounds.css b/themes/Adwaita/gtk-3.0/gtk-widgets-backgrounds.css
index 1d97d07..980cded 100644
--- a/themes/Adwaita/gtk-3.0/gtk-widgets-backgrounds.css
+++ b/themes/Adwaita/gtk-3.0/gtk-widgets-backgrounds.css
@@ -89,6 +89,31 @@
to (@insensitive_bg_color));
}
+/* Unfocused window button background */
+.button:window-unfocused,
+.primary-toolbar .button.raised:window-unfocused,
+.primary-toolbar .raised .button:window-unfocused {
+ background-image: none;
+ background-color: @unfocused_button_background;
+}
+
+/* Unfocused window pushed button background */
+.button:active:window-unfocused {
+ background-image: none;
+ background-color: @unfocused_borders_color;
+}
+
+/* Unfocused window insensitive button background */
+.button:insensitive:window-unfocused {
+ background-image: none;
+ background-color: @unfocused_insensitive_bg_color;
+}
+
+.button:insensitive:active:window-unfocused {
+ background-image: none;
+ background-color: mix(@unfocused_insensitive_bg_color, @unfocused_borders_color, 0.5);
+}
+
/* Entry background */
.entry,
GtkComboBox.combobox-entry .button,
@@ -134,6 +159,25 @@ GtkComboBox.combobox-entry .button:insensitive {
background-image: none;
}
+/* Unfocused windows entry background */
+.entry:window-unfocused,
+GtkComboBox.combobox-entry .button:window-unfocused,
+column-header.button:window-unfocused,
+column-header .button:window-unfocused,
+column-header.button:insensitive:window-unfocused,
+column-header .button:insensitive:window-unfocused {
+ background-image: none;
+ background-color: @theme_unfocused_base_color;
+}
+
+/* Unfocused windows insensitive entry background */
+.entry:insensitive:window-unfocused,
+GtkComboBox.combobox-entry .button:insensitive:window-unfocused {
+ background-image: none;
+ background-color: @unfocused_insensitive_bg_color;
+}
+
+
/* Primary and inline toolbars background */
.primary-toolbar .toolbar,
.primary-toolbar.toolbar,
@@ -148,6 +192,14 @@ GtkComboBox.combobox-entry .button:insensitive {
to (@toolbar_gradient_final));
}
+/* Unfocused window primary and inline toolbars background */
+.primary-toolbar .toolbar:window-unfocused,
+.primary-toolbar.toolbar:window-unfocused,
+.inline-toolbar.toolbar:window-unfocused {
+ background-image: none;
+ background-color: @unfocused_toolbar;
+}
+
/* Active switch background*/
GtkSwitch.trough:active,
GtkScale.progressbar {
@@ -158,6 +210,16 @@ GtkScale.progressbar {
to (@switch_trough_active_bg_b));
}
+GtkSwitch.trough:window-unfocused {
+ background-color: @theme_unfocused_bg_color; /* FIXME */
+ background-image: none;
+}
+
+GtkSwitch.trough:active:window-unfocused {
+ background-color: @unfocused_borders_color;
+ background-image: none;
+}
+
GtkScale.progressbar.vertical {
background-color: none;
background-image: -gtk-gradient (linear,
diff --git a/themes/Adwaita/gtk-3.0/gtk-widgets-borders.css b/themes/Adwaita/gtk-3.0/gtk-widgets-borders.css
index ad76bf7..0c18344 100644
--- a/themes/Adwaita/gtk-3.0/gtk-widgets-borders.css
+++ b/themes/Adwaita/gtk-3.0/gtk-widgets-borders.css
@@ -172,21 +172,19 @@ column-header:last-child .button:active:hover {
/* unfocused window: generic element borders */
.button:window-unfocused,
GtkComboBox.combobox-entry .entry:window-unfocused,
-GtkComboBox.combobox-entry .button:window-unfocused, /* not working */
-GtkComboBox *:window-unfocused, /* not working */
+GtkComboBox.combobox-entry .button:window-unfocused,
+GtkComboBox *:window-unfocused,
.entry:window-unfocused,
GtkSwitch.trough:window-unfocused,
-.trough:window-unfocused, /* not working */
-.trough row:window-unfocused, /* not working */
-GtkProgressBar:window-unfocused, /* not working */
-.progressbar:window-unfocused /* not working */ {
+.trough:window-unfocused {
border-image: url("borders/generic-border-unfocused.svg") 3 3 4 3 / 3 3 4 3 stretch;
border-radius: 3;
border-width: 1 1 2 1;
}
/* unfocused window: primary toolbar generic element borders */
-.primary-toolbar .button:window-unfocused,
+.primary-toolbar .button.raised:window-unfocused,
+.primary-toolbar .raised .button:window-unfocused,
.primary-toolbar .entry:window-unfocused,
.inline-toolbar.toolbar .button:window-unfocused {
border-image: url("borders/primary-toolbar-generic-border-unfocused.svg") 4 / 4 stretch;
diff --git a/themes/Adwaita/gtk-3.0/gtk-widgets.css b/themes/Adwaita/gtk-3.0/gtk-widgets.css
index ba2cba0..dc986a2 100644
--- a/themes/Adwaita/gtk-3.0/gtk-widgets.css
+++ b/themes/Adwaita/gtk-3.0/gtk-widgets.css
@@ -51,6 +51,10 @@ GtkWindow {
color: @theme_fg_color;
}
+GtkWindow:window-unfocused {
+ color: @theme_unfocused_fg_color;
+}
+
* {
background-color: @theme_bg_color;
}
@@ -80,6 +84,13 @@ GtkWindow {
background-color: shade (@theme_bg_color, 0.915);
}
+*:window-unfocused {
+ /* I want everything nice and flat in the unfocused window */
+ text-shadow: none;
+ icon-shadow: none;
+ color: @theme_unfocused_fg_color;
+}
+
/************
* Tooltips *
************/
@@ -317,6 +328,15 @@ GtkTreeView .separator,
to (alpha (@progressbar_pattern, 0.25)));
}
+.progressbar:window-unfocused,
+.progressbar row:window-unfocused,
+.progressbar row:selected:window-unfocused {
+ -adwaita-progressbar-pattern: none;
+ background-image: none;
+ background-color: @theme_selected_bg_color; /* FIXME */
+ box-shadow: none;
+}
+
/* through component */
GtkProgressBar,
.trough row {
@@ -333,6 +353,12 @@ GtkProgressBar,
to (mix (@trough_bg_color_b, @theme_selected_bg_color, 0.25)));
}
+GtkProgressBar:window-unfocused,
+.trough row:window-unfocused {
+ background-image: none;
+ background-color: mix(@theme_unfocused_bg_color, @unfocused_borders_color, 0.5); /*FIXME*/
+}
+
/************
* GtkScale *
************/
@@ -387,6 +413,11 @@ GtkScale.trough {
box-shadow: 0 -1 inset @theme_bg_color;
}
+GtkScale.trough:window-unfocused {
+ box-shadow: none;
+ color: red;
+}
+
/**********
* Frames *
**********/
@@ -446,11 +477,16 @@ GtkComboBox.combobox-entry .button {
text-shadow: none;
}
+.button *:active:window-unfocused {
+ color: @theme_unfocused_bg_color;
+}
+
/* We may want a background for focused buttons, but in the meantime let's remove it too */
.primary-toolbar .button,
.primary-toolbar .button:focus,
.primary-toolbar .button:insensitive,
-.primary-toolbar .button:window-unfocused {
+.primary-toolbar .button:window-unfocused,
+.primary-toolbar .button:insensitive:window-unfocused {
background-image: none;
background-color: none;
}
@@ -809,6 +845,12 @@ GtkLinkButton * {
background-color: @theme_base_color;
}
+.notebook:window-unfocused,
+.notebook GtkViewport:window-unfocused { /* not working */
+ background-color: red;
+ border-color: red;
+}
+
.notebook tab {
padding: 3;
background-image: -gtk-gradient (linear,
@@ -819,6 +861,11 @@ GtkLinkButton * {
-adwaita-focus-border-radius: 2;
}
+.notebook tab:window-unfocused { /* not working */
+ background-image: none;
+ background-color: red;
+}
+
.notebook tab:active {
-adwaita-border-gradient: -gtk-gradient (linear,
left top, left bottom,
@@ -832,6 +879,17 @@ GtkLinkButton * {
to (@theme_base_color));
}
+.notebook tab:active:window-unfocused { /* not working */
+ background-image: none;
+ background-color: red;
+ -adwaita-border-gradient: -gtk-gradient (linear,
+ left top, left bottom,
+ from (red),
+ to (red));
+
+ -adwaita-selected-tab-color: red;
+}
+
.notebook tab.top {
padding: 4 2 0;
}
@@ -872,8 +930,6 @@ GtkLinkButton * {
background-image: none;
}
-/* FIXME: background behind tabs -- slight gradient continuing from menubar */
-
/**************
* ComboBoxes *
**************/
@@ -1332,6 +1388,11 @@ GtkTreeMenu .menuitem * {
border-color: shade (@theme_bg_color, 0.91);
}
+.primary-toolbar .toolbar:window-unfocused,
+.primary-toolbar.toolbar:window-unfocused {
+ border-color: @unfocused_borders_color;
+}
+
/* progressbars on primary toolbar entries are special */
.primary-toolbar .toolbar .entry.progressbar,
.primary-toolbar.toolbar .entry.progressbar {
@@ -1428,6 +1489,14 @@ GtkSwitch.trough:insensitive {
background-color: shade (@theme_bg_color, 0.9);
}
+GtkSwitch.trough:window-unfocused {
+ color: @theme_unfocused_fg_color;
+}
+
+GtkSwitch.trough:insensitive:window-unfocused {
+ color: @unfocused_borders_color; /* FIXME */
+}
+
GtkSwitch.slider {
border-width: 1;
border-radius: 2;
@@ -1459,6 +1528,21 @@ GtkSwitch.slider:insensitive {
background-color: @switch_slider_insensitive_bg;
}
+GtkSwitch.slider:window-unfocused {
+ background-color: @theme_unfocused_base_color;
+ background-image: none;
+
+ border-color: @unfocused_borders_color;
+
+ box-shadow: none;
+
+ color: @theme_unfocused_base_color;
+}
+
+GtkSwitch.slider:insensitive:window-unfocused {
+ background-color: @theme_unfocused_bg_color;
+}
+
GtkViewport,
GtkIconView {
border-radius: 3;
@@ -1553,6 +1637,11 @@ column-header .button *:active:hover {
icon-shadow: none;
}
+column-header.button:window-unfocused,
+column-header .button:window-unfocused {
+ border-image: none;
+}
+
row:hover {
border-width: 0;
}
diff --git a/themes/Adwaita/gtk-3.0/gtk.css b/themes/Adwaita/gtk-3.0/gtk.css
index 5075e20..1fd4476 100644
--- a/themes/Adwaita/gtk-3.0/gtk.css
+++ b/themes/Adwaita/gtk-3.0/gtk.css
@@ -22,12 +22,16 @@
@define-color theme_selected_bg_color @selected_bg_color;
@define-color theme_selected_fg_color @selected_fg_color;
- define-color theme_unfocused_base_color @theme_base_color; /* FIXME */
- define-color theme_unfocused_text_color @theme_text_color; /* FIXME */
- define-color theme_unfocused_fg_color @theme_fg_color; /* FIXME */
+ define-color theme_unfocused_base_color shade(@insensitive_bg_color, 1.05);
+ define-color theme_unfocused_text_color #a7aba7;
+ define-color theme_unfocused_fg_color #a7aba7;
@define-color theme_unfocused_bg_color @theme_bg_color; /* FIXME */
@define-color theme_unfocused_selected_bg_color @theme_selected_bg_color; /* FIXME */
@define-color theme_unfocused_selected_fg_color @theme_selected_fg_color; /* FIXME */
+ define-color unfocused_button_background @theme_unfocused_bg_color;
+ define-color unfocused_borders_color #a7aba7;
+ define-color unfocused_insensitive_bg_color mix(@theme_bg_color, @theme_unfocused_base_color, 0.5);
+ define-color unfocused_toolbar mix(@theme_unfocused_bg_color, @unfocused_borders_color, 0.5);
@define-color menu_bg_color shade (@theme_bg_color, 1.1);
@define-color menu_fg_color @theme_fg_color;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]