[gnome-themes-standard] Use a new style for entries and theme comboboxes with entries correctly



commit ca2a8b20d579f4388656c47437e264d6eca46c90
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Tue Aug 9 20:11:28 2011 +0200

    Use a new style for entries and theme comboboxes with entries correctly

 themes/Adwaita/gtk-3.0/assets/Makefile.am          |    1 +
 .../assets/combobox-entry-border-active.svg        |  112 ++++++++++++++++++++
 themes/Adwaita/gtk-3.0/gtk-dark.css                |    5 +
 themes/Adwaita/gtk-3.0/gtk-widgets-assets-dark.css |    6 +
 themes/Adwaita/gtk-3.0/gtk-widgets-assets.css      |    9 ++
 .../Adwaita/gtk-3.0/gtk-widgets-dark-overrides.css |    5 -
 themes/Adwaita/gtk-3.0/gtk-widgets.css             |   31 ++++++
 themes/Adwaita/gtk-3.0/gtk.css                     |    5 +
 8 files changed, 169 insertions(+), 5 deletions(-)
---
diff --git a/themes/Adwaita/gtk-3.0/assets/Makefile.am b/themes/Adwaita/gtk-3.0/assets/Makefile.am
index ab26380..76b812b 100644
--- a/themes/Adwaita/gtk-3.0/assets/Makefile.am
+++ b/themes/Adwaita/gtk-3.0/assets/Makefile.am
@@ -18,6 +18,7 @@ assets_DATA = 		\
 	checkbox-mixed-dark.svg \
 	checkbox-menuitem-checked.svg \
 	checkbox-menuitem-checked-selected.svg \
+	combobox-entry-border-active.svg \
 	entry-border-focused.svg \
 	entry-border-focused-dark.svg \
 	entry-border-normal.svg \
diff --git a/themes/Adwaita/gtk-3.0/assets/combobox-entry-border-active.svg b/themes/Adwaita/gtk-3.0/assets/combobox-entry-border-active.svg
new file mode 100644
index 0000000..907d96f
--- /dev/null
+++ b/themes/Adwaita/gtk-3.0/assets/combobox-entry-border-active.svg
@@ -0,0 +1,112 @@
+<?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="svg11633"
+   version="1.1"
+   inkscape:version="0.48.1 r9760"
+   sodipodi:docname="entry-border-normal.svg">
+  <defs
+     id="defs11635">
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient7879-7-3"
+       id="linearGradient6823"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.63117873,0,0,1.040154,-59.8156,-1080.0246)"
+       x1="404.67053"
+       y1="262.40231"
+       x2="404.67053"
+       y2="280.36218" />
+    <linearGradient
+       id="linearGradient7879-7-3">
+      <stop
+         id="stop7881-0-8"
+         offset="0"
+         style="stop-color:#babdb6;stop-opacity:1;" />
+      <stop
+         id="stop7883-8-6"
+         offset="1"
+         style="stop-color:#9a9d93;stop-opacity:1" />
+    </linearGradient>
+    <linearGradient
+       y2="280.36218"
+       x2="404.67053"
+       y1="262.40231"
+       x1="404.67053"
+       gradientTransform="matrix(0.63117873,0,0,1.040154,-165.8156,-291.5998)"
+       gradientUnits="userSpaceOnUse"
+       id="linearGradient12171"
+       xlink:href="#linearGradient7879-7-3"
+       inkscape:collect="always" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient7879-7-3"
+       id="linearGradient12211"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.05703423,0,0,0.60000002,-14.528518,-168.41733)"
+       x1="404.67053"
+       y1="262.40231"
+       x2="404.67053"
+       y2="280.36218" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="26.24"
+     inkscape:cx="2.8050622"
+     inkscape:cy="7.542469"
+     inkscape:current-layer="layer1"
+     showgrid="true"
+     inkscape:grid-bbox="true"
+     inkscape:document-units="px"
+     inkscape:window-width="1280"
+     inkscape:window-height="741"
+     inkscape:window-x="0"
+     inkscape:window-y="26"
+     inkscape:window-maximized="1" />
+  <metadata
+     id="metadata11638">
+    <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></dc:title>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     id="layer1"
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer">
+    <rect
+       transform="scale(1,-1)"
+       ry="2.2980974"
+       rx="2.2980974"
+       y="-15.5"
+       x="0.49999997"
+       height="15"
+       width="15.000001"
+       id="rect5760"
+       style="fill:none;fill-opacity:0;stroke:url(#linearGradient12211);stroke-width:0.99999987999999995;stroke-linecap:butt;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline;enable-background:new"
+       inkscape:export-filename="/home/cosimoc/Sources/Checkouts/gnome-themes-standard/themes/Adwaita/gtk-3.0/assets/entry-normal-border.png"
+       inkscape:export-xdpi="90"
+       inkscape:export-ydpi="90" />
+  </g>
+</svg>
diff --git a/themes/Adwaita/gtk-3.0/gtk-dark.css b/themes/Adwaita/gtk-3.0/gtk-dark.css
index aa21487..0de7b82 100644
--- a/themes/Adwaita/gtk-3.0/gtk-dark.css
+++ b/themes/Adwaita/gtk-3.0/gtk-dark.css
@@ -58,6 +58,11 @@
 @define-color progressbar_background_b #2465ba;
 @define-color progressbar_pattern #000000;
 
+ define-color entry_background_a #848684;
+ define-color entry_background_b #babcba;
+ define-color entry_background_c #e7e8e7;
+ define-color entry_background_d #f3f3f3;
+
 @define-color focused_entry_border @theme_selected_bg_color;
 @define-color focused_entry_inset alpha (@theme_selected_bg_color, 0.50);
 
diff --git a/themes/Adwaita/gtk-3.0/gtk-widgets-assets-dark.css b/themes/Adwaita/gtk-3.0/gtk-widgets-assets-dark.css
index a6b0af3..fcd359c 100644
--- a/themes/Adwaita/gtk-3.0/gtk-widgets-assets-dark.css
+++ b/themes/Adwaita/gtk-3.0/gtk-widgets-assets-dark.css
@@ -72,6 +72,12 @@
     border-image: url("assets/entry-border-focused-dark.svg") 2 / 2 stretch;
 }
 
+GtkComboBox.combobox-entry .button:active,
+GtkComboBox.combobox-entry .button:hover:active,
+GtkComboBox.combobox-entry .button {
+    border-image: url("assets/entry-border-normal-dark.svg") 2 / 2 2 2 0 stretch;
+}
+
 GtkScale.trough,
 GtkSwitch.trough,
 GtkScale.trough.horizontal {
diff --git a/themes/Adwaita/gtk-3.0/gtk-widgets-assets.css b/themes/Adwaita/gtk-3.0/gtk-widgets-assets.css
index fdb4d28..0822d25 100644
--- a/themes/Adwaita/gtk-3.0/gtk-widgets-assets.css
+++ b/themes/Adwaita/gtk-3.0/gtk-widgets-assets.css
@@ -72,6 +72,15 @@
     border-image: url("assets/entry-border-focused.svg") 2 / 2 stretch;
 }
 
+GtkComboBox.combobox-entry .button {
+    border-image: url("assets/entry-border-normal.svg") 2 / 2 2 2 0 stretch;
+}
+
+GtkComboBox.combobox-entry .button:active,
+GtkComboBox.combobox-entry .button:hover:active {
+    border-image: url("assets/combobox-entry-border-active.svg") 2 / 2 2 2 0 stretch;
+}
+
 GtkScale.trough,
 GtkSwitch.trough,
 GtkScale.trough.horizontal {
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 bcfeba7..9443eab 100644
--- a/themes/Adwaita/gtk-3.0/gtk-widgets-dark-overrides.css
+++ b/themes/Adwaita/gtk-3.0/gtk-widgets-dark-overrides.css
@@ -16,11 +16,6 @@ GtkIconView.view.cell:selected:focused {
 }
 
 .entry {
-    background-image: -gtk-gradient (linear, 
-                                     left top,
-                                     left bottom,
-                                     from(@theme_text_color),
-                                     to(#ffffff));
     color: #000000;
 }
 
diff --git a/themes/Adwaita/gtk-3.0/gtk-widgets.css b/themes/Adwaita/gtk-3.0/gtk-widgets.css
index 528ece4..44df9fb 100644
--- a/themes/Adwaita/gtk-3.0/gtk-widgets.css
+++ b/themes/Adwaita/gtk-3.0/gtk-widgets.css
@@ -136,8 +136,20 @@ GtkStatusbar {
     /* border-image defined in the -assets variants */
 }
 
+.entry,
+GtkComboBox.combobox-entry .button,
+GtkComboBox.combobox-entry .button:prelight {
+    background-image: -gtk-gradient(linear,
+                                    left top, left bottom,
+                                    from(@entry_background_a),
+                                    color-stop(0.30, @entry_background_b),
+                                    color-stop(0.85, @entry_background_c),
+                                    to(@entry_background_d));
+}
+
 .entry:insensitive {
     background-color: @insensitive_bg_color;
+    background-image: none;
 
     border-image: none;
     border-style: solid;
@@ -475,6 +487,25 @@ GtkComboBox .button *:prelight {
     color: @theme_text_color;
 }
 
+GtkComboBox.combobox-entry .button {
+    border-width: 1 1 1 0;
+    border-radius: 0 3 3 0;
+
+    padding: 2 3;
+}
+
+GtkComboBox.combobox-entry .button:active,
+GtkComboBox.combobox-entry .button:hover:active {
+    background-image: -gtk-gradient(linear,
+                                    left top, left bottom,
+                                    from(shade(@entry_background_a, 0.95)),
+                                    color-stop(0.30, shade(@entry_background_b, 0.95)),
+                                    color-stop(0.85, shade(@entry_background_c, 0.95)),
+                                    to(shade(@entry_background_d, 0.95)));
+
+    box-shadow: 1 0 inset shade(@frame_color, 1.50), 2 0 inset shade(@frame_color, 1.60);
+}
+
 /**************
  * Scrollbars *
  **************/
diff --git a/themes/Adwaita/gtk-3.0/gtk.css b/themes/Adwaita/gtk-3.0/gtk.css
index 4774e3d..712bcf6 100644
--- a/themes/Adwaita/gtk-3.0/gtk.css
+++ b/themes/Adwaita/gtk-3.0/gtk.css
@@ -88,6 +88,11 @@
 @define-color progressbar_background_b #1f72c6;
 @define-color progressbar_pattern #000000;
 
+ define-color entry_background_a #e1e1e1;
+ define-color entry_background_b #f8f8f8;
+ define-color entry_background_c #fafafa;
+ define-color entry_background_d @theme_base_color;
+
 @define-color internal_element_color #888a85;
 @define-color internal_element_insensitive shade (@internal_element_color, 1.6);
 



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