[gnome-themes-standard] Widget theme: initial window-unfocused work.



commit 92660bfaa977885c42926801de58cbe2f24026e1
Author: Lapo Calamandrei <calamandrei gmail com>
Date:   Wed Dec 7 18:41:09 2011 +0100

    Widget theme: initial window-unfocused work.

 themes/Adwaita/gtk-3.0/Makefile.am                 |    1 -
 themes/Adwaita/gtk-3.0/borders/Makefile.am         |    4 +-
 .../gtk-3.0/borders/generic-border-unfocused.svg   |   77 ++++++++++++
 .../primary-toolbar-generic-border-unfocused.svg   |  121 ++++++++++++++++++
 themes/Adwaita/gtk-3.0/gtk-widgets-borders.css     |   22 ++++
 .../gtk-3.0/gtk-widgets-window-unfocused.css       |  132 --------------------
 themes/Adwaita/gtk-3.0/gtk-widgets.css             |   37 +++++--
 themes/Adwaita/gtk-3.0/gtk.css                     |   10 +-
 8 files changed, 259 insertions(+), 145 deletions(-)
---
diff --git a/themes/Adwaita/gtk-3.0/Makefile.am b/themes/Adwaita/gtk-3.0/Makefile.am
index f5def06..aa29e7d 100644
--- a/themes/Adwaita/gtk-3.0/Makefile.am
+++ b/themes/Adwaita/gtk-3.0/Makefile.am
@@ -13,7 +13,6 @@ theme_DATA = 		\
 	gtk-widgets-dark-overrides.css \
 	gtk-widgets-assets.css \
 	gtk-widgets-assets-dark.css \
-	gtk-widgets-window-unfocused.css \
 	settings.ini
 
 EXTRA_DIST = $(theme_DATA)
diff --git a/themes/Adwaita/gtk-3.0/borders/Makefile.am b/themes/Adwaita/gtk-3.0/borders/Makefile.am
index 56bceb1..ad6b532 100644
--- a/themes/Adwaita/gtk-3.0/borders/Makefile.am
+++ b/themes/Adwaita/gtk-3.0/borders/Makefile.am
@@ -8,6 +8,7 @@ borders_DATA = 		\
 	generic-border-focused-dark.svg \
 	generic-border.svg \
 	generic-border-dark.svg \
+	generic-border-unfocused.svg \
 	primary-toolbar-button-border-focused.svg \
 	primary-toolbar-button-border-focused-dark.svg \
 	primary-toolbar-button-border.svg \
@@ -15,6 +16,7 @@ borders_DATA = 		\
 	primary-toolbar-generic-border-focused.svg \
 	primary-toolbar-generic-border-focused-dark.svg \
 	primary-toolbar-generic-border.svg \
-	primary-toolbar-generic-border-dark.svg
+	primary-toolbar-generic-border-dark.svg \
+	primary-toolbar-generic-border-unfocused.svg
 
 EXTRA_DIST = $(borders_DATA)
diff --git a/themes/Adwaita/gtk-3.0/borders/generic-border-unfocused.svg b/themes/Adwaita/gtk-3.0/borders/generic-border-unfocused.svg
new file mode 100644
index 0000000..03d871a
--- /dev/null
+++ b/themes/Adwaita/gtk-3.0/borders/generic-border-unfocused.svg
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/";
+   xmlns:cc="http://creativecommons.org/ns#";
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";
+   xmlns:svg="http://www.w3.org/2000/svg";
+   xmlns="http://www.w3.org/2000/svg";
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd";
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape";
+   width="16px"
+   height="16px"
+   id="svg33222"
+   version="1.1"
+   inkscape:version="0.48.1 r9760"
+   sodipodi:docname="generic-border-unfocused.svg">
+  <defs
+     id="defs33224" />
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#8e8e8e"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="1"
+     inkscape:pageshadow="2"
+     inkscape:zoom="16"
+     inkscape:cx="15.49645"
+     inkscape:cy="-0.54712037"
+     inkscape:current-layer="layer1"
+     showgrid="false"
+     inkscape:grid-bbox="true"
+     inkscape:document-units="px"
+     inkscape:window-width="1920"
+     inkscape:window-height="1022"
+     inkscape:window-x="0"
+     inkscape:window-y="26"
+     inkscape:window-maximized="1"
+     inkscape:snap-nodes="false"
+     inkscape:snap-bbox="true"
+     inkscape:showpageshadow="false"
+     showborder="false">
+    <inkscape:grid
+       type="xygrid"
+       id="grid2992"
+       empspacing="5"
+       visible="true"
+       enabled="true"
+       snapvisiblegridlinesonly="true" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata33227">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage"; />
+        <dc:title />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     id="layer1"
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer">
+    <rect
+       ry="2.5"
+       rx="2.5000005"
+       y="0.5"
+       x="0.5"
+       height="13.999999"
+       width="15"
+       id="rect17861"
+       style="color:#000000;fill:none;stroke:#a7aba7;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+  </g>
+</svg>
diff --git a/themes/Adwaita/gtk-3.0/borders/primary-toolbar-generic-border-unfocused.svg b/themes/Adwaita/gtk-3.0/borders/primary-toolbar-generic-border-unfocused.svg
new file mode 100644
index 0000000..7e233a1
--- /dev/null
+++ b/themes/Adwaita/gtk-3.0/borders/primary-toolbar-generic-border-unfocused.svg
@@ -0,0 +1,121 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/";
+   xmlns:cc="http://creativecommons.org/ns#";
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";
+   xmlns:svg="http://www.w3.org/2000/svg";
+   xmlns="http://www.w3.org/2000/svg";
+   xmlns:xlink="http://www.w3.org/1999/xlink";
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd";
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape";
+   width="16px"
+   height="16px"
+   id="svg33222"
+   version="1.1"
+   inkscape:version="0.48.1 r9760"
+   sodipodi:docname="primary-toolbar-generic-border-unfocused.svg">
+  <defs
+     id="defs33224">
+    <linearGradient
+       id="linearGradient3837">
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1;"
+         offset="0"
+         id="stop3839" />
+      <stop
+         style="stop-color:#ffffff;stop-opacity:0;"
+         offset="1"
+         id="stop3841" />
+    </linearGradient>
+    <linearGradient
+       gradientTransform="matrix(0.84615379,0,0,0.91666667,1.2307694,1.125)"
+       y2="14.003025"
+       x2="7.999999"
+       y1="1.92503"
+       x1="7.999999"
+       gradientUnits="userSpaceOnUse"
+       id="linearGradient3864"
+       xlink:href="#linearGradient3837"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient3826-9">
+      <stop
+         id="stop3828-2"
+         offset="0"
+         style="stop-color:#000000;stop-opacity:0.059" />
+      <stop
+         id="stop3830-6"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:0.251" />
+    </linearGradient>
+    <linearGradient
+       y2="13.462841"
+       x2="8.000001"
+       y1="1.5371597"
+       x1="8.0000019"
+       gradientTransform="matrix(0.86666667,0,0,0.92857148,1.0666667,1.0357141)"
+       gradientUnits="userSpaceOnUse"
+       id="linearGradient3880"
+       xlink:href="#linearGradient3826-9"
+       inkscape:collect="always" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#8e8e8e"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="1"
+     inkscape:pageshadow="2"
+     inkscape:zoom="22.627417"
+     inkscape:cx="17.109935"
+     inkscape:cy="9.0507553"
+     inkscape:current-layer="layer1"
+     showgrid="false"
+     inkscape:grid-bbox="true"
+     inkscape:document-units="px"
+     inkscape:window-width="1920"
+     inkscape:window-height="1022"
+     inkscape:window-x="0"
+     inkscape:window-y="26"
+     inkscape:window-maximized="1"
+     inkscape:snap-nodes="false"
+     inkscape:snap-bbox="true"
+     inkscape:showpageshadow="false"
+     showborder="false">
+    <inkscape:grid
+       type="xygrid"
+       id="grid2992"
+       empspacing="5"
+       visible="true"
+       enabled="true"
+       snapvisiblegridlinesonly="true" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata33227">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage"; />
+        <dc:title />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     id="layer1"
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer">
+    <rect
+       ry="2.5"
+       rx="2.5"
+       y="1.5"
+       x="1.5"
+       height="13"
+       width="13"
+       id="rect17861"
+       style="color:#000000;fill:none;stroke:#a7aba7;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+  </g>
+</svg>
diff --git a/themes/Adwaita/gtk-3.0/gtk-widgets-borders.css b/themes/Adwaita/gtk-3.0/gtk-widgets-borders.css
index a9f2cc0..ccc4708 100644
--- a/themes/Adwaita/gtk-3.0/gtk-widgets-borders.css
+++ b/themes/Adwaita/gtk-3.0/gtk-widgets-borders.css
@@ -168,3 +168,25 @@ column-header:last-child .button:active:hover {
     border-image: none;
     border-width: 0;
 }
+
+/* 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 */
+.entry: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 .entry:window-unfocused { 
+    border-image: url("borders/primary-toolbar-generic-border-unfocused.svg") 4 / 4 stretch;
+    border-radius: 3;
+    border-width: 2;
+    border-style: solid;
+    border-color: transparent;
+
+}
diff --git a/themes/Adwaita/gtk-3.0/gtk-widgets.css b/themes/Adwaita/gtk-3.0/gtk-widgets.css
index 80c04fa..5a43746 100644
--- a/themes/Adwaita/gtk-3.0/gtk-widgets.css
+++ b/themes/Adwaita/gtk-3.0/gtk-widgets.css
@@ -198,20 +198,33 @@ GtkTreeView .separator,
 .spinbutton .button:prelight,
 .spinbutton .button:active,
 .spinbutton .button:focus,
-.spinbutton .button:insensitive  {
+.spinbutton .button:insensitive,
+.spinbutton .button:window-unfocused {
     border-width: 0 1;
     border-radius: 0;
     border-style: solid;
     border-image: none;
-    border-color: @inset_dark_color;
 
     box-shadow: none;
 }
 
 .spinbutton .button,
 .spinbutton .button:prelight,
+.spinbutton .button:active,
 .spinbutton .button:focus,
 .spinbutton .button:insensitive {
+    border-color: @inset_dark_color;
+}
+
+.spinbutton .button:window-unfocused {
+    border-color:  @inset_dark_color; /* FIXME */
+}
+
+.spinbutton .button,
+.spinbutton .button:prelight,
+.spinbutton .button:focus,
+.spinbutton .button:insensitive,
+.spinbutton .button:window-unfocused {
     background-color: none;
     background-image: none;
 }
@@ -229,7 +242,8 @@ GtkTreeView .separator,
 .spinbutton .button:first-child:prelight,
 .spinbutton .button:first-child:active,
 .spinbutton .button:first-child:focus,
-.spinbutton .button:first-child:insensitive {
+.spinbutton .button:first-child:insensitive,
+.spinbutton .button:first-child:window-unfocused {
     border-left-width: 0;
     border-radius: 2 0 0 2;
 }
@@ -238,7 +252,8 @@ GtkTreeView .separator,
 .spinbutton .button:last-child:prelight,
 .spinbutton .button:last-child:active,
 .spinbutton .button:last-child:focus,
-.spinbutton .button:last-child:insensitive {
+.spinbutton .button:last-child:insensitive,
+.spinbutton .button:last-child:window-unfocused {
     border-width: 0;
     border-radius: 0 2 2 0;
 }
@@ -434,7 +449,8 @@ GtkComboBox.combobox-entry .button {
 /* 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:insensitive,
+.primary-toolbar .button:window-unfocused {
     background-image: none;
     background-color: none;
 }
@@ -443,7 +459,8 @@ GtkComboBox.combobox-entry .button {
 .primary-toolbar .button,
 .primary-toolbar .button:hover,
 .primary-toolbar .button:focus,
-.primary-toolbar .button:insensitive {
+.primary-toolbar .button:insensitive,
+.primary-toolbar .button:window-unfocused {
     border-image: none;
 
     /* setting border-style: none; here would override the border-width values 
@@ -829,9 +846,11 @@ GtkComboBox .separator {
 
 GtkComboBox.combobox-entry .entry:first-child,
 GtkComboBox.combobox-entry .entry:focus:first-child,
+GtkComboBox.combobox-entry .entry:window-unfocused:first-child,
 GtkComboBox.combobox-entry .button:first-child,
 GtkComboBox.combobox-entry .button:focus:first-child,
-GtkComboBox.combobox-entry .button:insensitive:first-child {
+GtkComboBox.combobox-entry .button:insensitive:first-child,
+GtkComboBox.combobox-entry .button:window-unfocused:first-child {
     border-image-width: 3 0 4 3;
     border-radius: 3 0 0 3;
     border-right-width: 0;
@@ -839,10 +858,12 @@ GtkComboBox.combobox-entry .button:insensitive:first-child {
 
 GtkComboBox.combobox-entry .entry:last-child,
 GtkComboBox.combobox-entry .entry:focus:last-child,
+GtkComboBox.combobox-entry .entry:window-unfocused:last-child,
 GtkComboBox.combobox-entry .button:last-child,
 GtkComboBox.combobox-entry .button:focus:last-child,
 GtkComboBox.combobox-entry .button:insensitive:last-child,
-GtkComboBox.combobox-entry .button:active:last-child {
+GtkComboBox.combobox-entry .button:active:last-child,
+GtkComboBox.combobox-entry .button:window-unfocused:last-child {
     border-image-width: 3 3 4 0;
     border-radius: 0 3 3 0;
     border-left-width: 0;
diff --git a/themes/Adwaita/gtk-3.0/gtk.css b/themes/Adwaita/gtk-3.0/gtk.css
index db43b56..5075e20 100644
--- a/themes/Adwaita/gtk-3.0/gtk.css
+++ b/themes/Adwaita/gtk-3.0/gtk.css
@@ -22,6 +22,13 @@
 @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_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 menu_bg_color shade (@theme_bg_color, 1.1);
 @define-color menu_fg_color @theme_fg_color;
 @define-color menu_controls_color shade (@theme_fg_color, 0.9);
@@ -68,8 +75,6 @@
 @define-color button_text_shadow alpha(white, 0.7);
 @define-color primary_toolbar_button_text_shadow alpha(black, 0.1);
 
- 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);
 
@@ -177,5 +182,4 @@
 @import url("gtk-widgets-assets.css");
 @import url("gtk-widgets.css");
 @import url("gnome-applications.css");
-/* @import url("gtk-widgets-window-unfocused.css"); */
 /* @import url("gtk-scrollbar-experiments.css"); */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]