[gnome-themes-standard/gnome-3-4] progress-bar: fix trough border rendering for selected cell renderers
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-themes-standard/gnome-3-4] progress-bar: fix trough border rendering for selected cell renderers
- Date: Mon, 2 Apr 2012 23:58:59 +0000 (UTC)
commit 5f0636a8bf2b54b955103b37aaf89a84b43b28b0
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Mon Apr 2 18:21:45 2012 -0400
progress-bar: fix trough border rendering for selected cell renderers
For selected cell renderers with a trough component, we shouldn't be
using a border with a bottom highlight. We have the same problem with
check/radios, where we use an alternate asset. Do the same here.
Also, make the progressbar border a bit darker in that situation, so it
stands out from the selection color background.
Reported in https://bugzilla.gnome.org/show_bug.cgi?id=673321
themes/Adwaita/gtk-3.0/borders/Makefile.am | 2 +
.../Adwaita/gtk-3.0/borders/generic-border-alt.svg | 101 +++++++++++++++
.../gtk-3.0/borders/generic-border-dark-alt.svg | 129 ++++++++++++++++++++
.../Adwaita/gtk-3.0/gtk-widgets-borders-dark.css | 9 ++
themes/Adwaita/gtk-3.0/gtk-widgets-borders.css | 9 ++
themes/Adwaita/gtk-3.0/gtk-widgets.css | 21 +++-
themes/Adwaita/gtk-3.0/gtk.gresource.xml | 2 +
7 files changed, 268 insertions(+), 5 deletions(-)
---
diff --git a/themes/Adwaita/gtk-3.0/borders/Makefile.am b/themes/Adwaita/gtk-3.0/borders/Makefile.am
index 457e951..f3adc21 100644
--- a/themes/Adwaita/gtk-3.0/borders/Makefile.am
+++ b/themes/Adwaita/gtk-3.0/borders/Makefile.am
@@ -6,7 +6,9 @@ EXTRA_DIST = \
generic-border-focused.svg \
generic-border-focused-dark.svg \
generic-border.svg \
+ generic-border-alt.svg \
generic-border-dark.svg \
+ generic-border-dark-alt.svg \
generic-border-unfocused.svg \
generic-border-unfocused-dark.svg \
primary-toolbar-button-border-focused.svg \
diff --git a/themes/Adwaita/gtk-3.0/borders/generic-border-alt.svg b/themes/Adwaita/gtk-3.0/borders/generic-border-alt.svg
new file mode 100644
index 0000000..89061a4
--- /dev/null
+++ b/themes/Adwaita/gtk-3.0/borders/generic-border-alt.svg
@@ -0,0 +1,101 @@
+<?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.2 r9819"
+ sodipodi:docname="generic-border.svg">
+ <defs
+ id="defs33224">
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient3845">
+ <stop
+ style="stop-color:#b2b6b2;stop-opacity:1"
+ offset="0"
+ id="stop3847" />
+ <stop
+ style="stop-color:#bdbfbd;stop-opacity:1"
+ offset="1"
+ id="stop3849" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3845"
+ id="linearGradient3851"
+ x1="8.0000019"
+ y1="1.5371597"
+ x2="8.000001"
+ y2="13.462841"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,1.0714286,0,-0.03571433)" />
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#8e8e8e"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="1"
+ inkscape:pageshadow="2"
+ inkscape:zoom="16"
+ inkscape:cx="3.80895"
+ 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="1021"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ 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></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ id="layer1"
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer">
+ <rect
+ ry="2.6785715"
+ rx="2.5000005"
+ y="0.49999991"
+ x="0.5"
+ height="14.999999"
+ width="15"
+ id="rect17861"
+ style="color:#000000;fill:none;stroke:url(#linearGradient3851);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/generic-border-dark-alt.svg b/themes/Adwaita/gtk-3.0/borders/generic-border-dark-alt.svg
new file mode 100644
index 0000000..28e1adf
--- /dev/null
+++ b/themes/Adwaita/gtk-3.0/borders/generic-border-dark-alt.svg
@@ -0,0 +1,129 @@
+<?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.2 r9819"
+ sodipodi:docname="generic-border-dark.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
+ inkscape:collect="always"
+ xlink:href="#linearGradient3837"
+ id="linearGradient3843"
+ x1="7.999999"
+ y1="1.92503"
+ x2="7.999999"
+ y2="14.003025"
+ gradientUnits="userSpaceOnUse" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3758"
+ id="linearGradient3764"
+ x1="8"
+ y1="0"
+ x2="8"
+ y2="15"
+ gradientUnits="userSpaceOnUse" />
+ <linearGradient
+ id="linearGradient3758">
+ <stop
+ style="stop-color:#1b2021;stop-opacity:1;"
+ offset="0"
+ id="stop3760" />
+ <stop
+ style="stop-color:#24282a;stop-opacity:1"
+ offset="1"
+ id="stop3762" />
+ </linearGradient>
+ <linearGradient
+ y2="15"
+ x2="8"
+ y1="0"
+ x1="8"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient3781"
+ xlink:href="#linearGradient3758"
+ inkscape:collect="always"
+ gradientTransform="matrix(1,0,0,1.0714286,0,-0.03571433)" />
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#8e8e8e"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="1"
+ inkscape:pageshadow="2"
+ inkscape:zoom="16"
+ inkscape:cx="15.81232"
+ inkscape:cy="8"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ inkscape:grid-bbox="true"
+ inkscape:document-units="px"
+ inkscape:window-width="1920"
+ inkscape:window-height="1021"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ 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></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ id="layer1"
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer">
+ <rect
+ ry="2.6785715"
+ rx="2.5000005"
+ y="0.49999991"
+ x="0.5"
+ height="14.999999"
+ width="15"
+ id="rect17861-2"
+ style="color:#000000;fill:none;stroke:url(#linearGradient3781);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-dark.css b/themes/Adwaita/gtk-3.0/gtk-widgets-borders-dark.css
index 0300921..234b766 100644
--- a/themes/Adwaita/gtk-3.0/gtk-widgets-borders-dark.css
+++ b/themes/Adwaita/gtk-3.0/gtk-widgets-borders-dark.css
@@ -17,6 +17,15 @@ GtkSwitch.trough {
border-color: transparent;
}
+.trough row:selected,
+.trough row:selected:focus {
+ border-image: url("borders/generic-border-dark-alt.svg") 3 / 3 stretch;
+ border-radius: 3px;
+ border-width: 1px;
+ border-style: solid;
+ border-color: transparent;
+}
+
/* focused element borders */
.entry:focus,
GtkComboBox.combobox-entry .entry:focus,
diff --git a/themes/Adwaita/gtk-3.0/gtk-widgets-borders.css b/themes/Adwaita/gtk-3.0/gtk-widgets-borders.css
index 5060d6b..55c386b 100644
--- a/themes/Adwaita/gtk-3.0/gtk-widgets-borders.css
+++ b/themes/Adwaita/gtk-3.0/gtk-widgets-borders.css
@@ -17,6 +17,15 @@ GtkSwitch.trough {
border-color: transparent;
}
+.trough row:selected,
+.trough row:selected:focus {
+ border-image: url("borders/generic-border-alt.svg") 3 / 3 stretch;
+ border-radius: 3px;
+ border-width: 1px;
+ border-style: solid;
+ border-color: transparent;
+}
+
/* focused element borders */
.entry:focus,
GtkComboBox.combobox-entry .entry:focus,
diff --git a/themes/Adwaita/gtk-3.0/gtk-widgets.css b/themes/Adwaita/gtk-3.0/gtk-widgets.css
index 3acf45c..ccf146e 100644
--- a/themes/Adwaita/gtk-3.0/gtk-widgets.css
+++ b/themes/Adwaita/gtk-3.0/gtk-widgets.css
@@ -510,6 +510,15 @@ GtkColorEditor GtkColorSwatch.color-light:hover {
/****************
* Progress bar *
****************/
+GtkProgressBar {
+ -GtkProgressBar-xspacing: 20;
+ -GtkProgressBar-yspacing: 20;
+}
+
+/* FIXME: this should really be a margin... */
+GtkProgressBar {
+ padding: 0 0 1px 0;
+}
/* progress component */
.progressbar,
@@ -537,6 +546,11 @@ GtkColorEditor GtkColorSwatch.color-light:hover {
to (alpha (@progressbar_pattern, 0.25)));
}
+.progressbar row:selected,
+.progressbar row:selected:focus {
+ border-color: shade(@progressbar_border, 0.85);
+}
+
.progressbar.vertical {
background-image: -gtk-gradient (linear,
left top, right top,
@@ -566,12 +580,9 @@ GtkColorEditor GtkColorSwatch.color-light:hover {
-adwaita-progressbar-pattern: none;
}
-/* through component */
-GtkProgressBar,
+/* for progressbars in cell renderers */
.trough row {
- padding: 0 0 1px 0;
- -GtkProgressBar-xspacing: 20;
- -GtkProgressBar-yspacing: 20;
+ padding: 0;
}
.trough row:selected,
diff --git a/themes/Adwaita/gtk-3.0/gtk.gresource.xml b/themes/Adwaita/gtk-3.0/gtk.gresource.xml
index b075fe0..0410579 100644
--- a/themes/Adwaita/gtk-3.0/gtk.gresource.xml
+++ b/themes/Adwaita/gtk-3.0/gtk.gresource.xml
@@ -145,9 +145,11 @@
<file preprocess="to-pixdata">borders/button-border-focused.svg</file>
<file preprocess="to-pixdata">borders/button-border.svg</file>
<file preprocess="to-pixdata">borders/generic-border-dark.svg</file>
+ <file preprocess="to-pixdata">borders/generic-border-dark-alt.svg</file>
<file preprocess="to-pixdata">borders/generic-border-focused-dark.svg</file>
<file preprocess="to-pixdata">borders/generic-border-focused.svg</file>
<file preprocess="to-pixdata">borders/generic-border.svg</file>
+ <file preprocess="to-pixdata">borders/generic-border-alt.svg</file>
<file preprocess="to-pixdata">borders/generic-border-unfocused-dark.svg</file>
<file preprocess="to-pixdata">borders/generic-border-unfocused.svg</file>
<file preprocess="to-pixdata">borders/primary-toolbar-button-border-dark.svg</file>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]