[gnome-shell/datetime: 47/47] Use SVGs from Jimmac for arrows instead of '<' and '>' glyphs
- From: David Zeuthen <davidz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/datetime: 47/47] Use SVGs from Jimmac for arrows instead of '<' and '>' glyphs
- Date: Wed, 15 Dec 2010 20:38:23 +0000 (UTC)
commit 397386c7613131f0f6eb28bc34dbed0cbff36899
Author: David Zeuthen <davidz redhat com>
Date: Wed Dec 15 15:37:28 2010 -0500
Use SVGs from Jimmac for arrows instead of '<' and '>' glyphs
Signed-off-by: David Zeuthen <davidz redhat com>
data/theme/calendar-arrow-left.svg | 82 +++++++++++++++++++++++++++++++++++
data/theme/calendar-arrow-right.svg | 82 +++++++++++++++++++++++++++++++++++
data/theme/gnome-shell.css | 28 ++++++++++++
js/ui/calendar.js | 8 +---
4 files changed, 194 insertions(+), 6 deletions(-)
---
diff --git a/data/theme/calendar-arrow-left.svg b/data/theme/calendar-arrow-left.svg
new file mode 100644
index 0000000..d5d97b3
--- /dev/null
+++ b/data/theme/calendar-arrow-left.svg
@@ -0,0 +1,82 @@
+<?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="16"
+ height="16"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.48+devel r9942 custom"
+ sodipodi:docname="New document 4">
+ <defs
+ id="defs4" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="1"
+ inkscape:cx="8.984481"
+ inkscape:cy="5.6224906"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ borderlayer="true"
+ inkscape:showpageshadow="false"
+ inkscape:window-width="930"
+ inkscape:window-height="681"
+ inkscape:window-x="1892"
+ inkscape:window-y="272"
+ inkscape:window-maximized="0">
+ <inkscape:grid
+ type="xygrid"
+ id="grid17403"
+ empspacing="5"
+ visible="true"
+ enabled="true"
+ snapvisiblegridlinesonly="true" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7">
+ <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
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-1036.3622)">
+ <path
+ sodipodi:type="star"
+ style="fill:#5f5f5f;fill-opacity:1;stroke:#5f5f5f;stroke-width:0.43015847;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
+ id="path18028"
+ sodipodi:sides="3"
+ sodipodi:cx="84.5"
+ sodipodi:cy="337.5"
+ sodipodi:r1="5"
+ sodipodi:r2="2.5"
+ sodipodi:arg1="0.52359878"
+ sodipodi:arg2="1.5707963"
+ inkscape:flatsided="true"
+ inkscape:rounded="0"
+ inkscape:randomized="0"
+ d="M 88.830127,340 80.169873,340 84.5,332.5 z"
+ transform="matrix(0,1.3621708,0.99186247,0,-325.48222,929.32667)" />
+ </g>
+</svg>
diff --git a/data/theme/calendar-arrow-right.svg b/data/theme/calendar-arrow-right.svg
new file mode 100644
index 0000000..545da7e
--- /dev/null
+++ b/data/theme/calendar-arrow-right.svg
@@ -0,0 +1,82 @@
+<?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="16"
+ height="16"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.48+devel r9942 custom"
+ sodipodi:docname="arrow-left.svg">
+ <defs
+ id="defs4" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="1"
+ inkscape:cx="7.7366092"
+ inkscape:cy="6.4536271"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ borderlayer="true"
+ inkscape:showpageshadow="false"
+ inkscape:window-width="930"
+ inkscape:window-height="681"
+ inkscape:window-x="1892"
+ inkscape:window-y="272"
+ inkscape:window-maximized="0">
+ <inkscape:grid
+ type="xygrid"
+ id="grid17403"
+ empspacing="5"
+ visible="true"
+ enabled="true"
+ snapvisiblegridlinesonly="true" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7">
+ <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
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-1036.3622)">
+ <path
+ sodipodi:type="star"
+ style="fill:#5f5f5f;fill-opacity:1;stroke:#5f5f5f;stroke-width:0.43015847;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
+ id="path18028"
+ sodipodi:sides="3"
+ sodipodi:cx="84.5"
+ sodipodi:cy="337.5"
+ sodipodi:r1="5"
+ sodipodi:r2="2.5"
+ sodipodi:arg1="0.52359878"
+ sodipodi:arg2="1.5707963"
+ inkscape:flatsided="true"
+ inkscape:rounded="0"
+ inkscape:randomized="0"
+ d="M 88.830127,340 80.169873,340 84.5,332.5 z"
+ transform="matrix(0,1.3621708,-0.99186247,0,342.48324,929.32667)" />
+ </g>
+</svg>
diff --git a/data/theme/gnome-shell.css b/data/theme/gnome-shell.css
index 8f81c36..6223051 100644
--- a/data/theme/gnome-shell.css
+++ b/data/theme/gnome-shell.css
@@ -761,6 +761,34 @@ StTooltip StLabel {
border-radius: 5px;
}
+.calendar-change-month-back {
+ width: 20px;
+ height: 20px;
+ background-image: url("calendar-arrow-left.svg");
+}
+.calendar-change-month-back:hover {
+ background: #999999;
+ background-image: url("calendar-arrow-left.svg");
+}
+.calendar-change-month-back:active {
+ background: #aaaaaa;
+ background-image: url("calendar-arrow-left.svg");
+}
+
+.calendar-change-month-forward {
+ width: 20px;
+ height: 20px;
+ background-image: url("calendar-arrow-right.svg");
+}
+.calendar-change-month-forward:hover {
+ background: #999999;
+ background-image: url("calendar-arrow-right.svg");
+}
+.calendar-change-month-forward:active {
+ background: #aaaaaa;
+ background-image: url("calendar-arrow-right.svg");
+}
+
.datemenu-date-label {
font-size: 16px;
font-weight: bold;
diff --git a/js/ui/calendar.js b/js/ui/calendar.js
index d1b646f..e75c952 100644
--- a/js/ui/calendar.js
+++ b/js/ui/calendar.js
@@ -214,19 +214,15 @@ Calendar.prototype = {
{ row: 0, col: 0, col_span: offsetCols + 7 });
this.actor.connect('style-changed', Lang.bind(this, this._onStyleChange));
- let [backlabel, forwardlabel] = ['<', '>'];
- if (St.Widget.get_default_direction () == St.TextDirection.RTL) {
- [backlabel, forwardlabel] = [forwardlabel, backlabel];
- }
- let back = new St.Button({ label: backlabel, style_class: 'calendar-change-month' });
+ let back = new St.Button({ style_class: 'calendar-change-month-back' });
this._topBox.add(back);
back.connect('clicked', Lang.bind(this, this._prevMonth));
this._dateLabel = new St.Label({style_class: 'calendar-change-month'});
this._topBox.add(this._dateLabel, { expand: true, x_fill: false, x_align: St.Align.MIDDLE });
- let forward = new St.Button({ label: forwardlabel, style_class: 'calendar-change-month' });
+ let forward = new St.Button({ style_class: 'calendar-change-month-forward' });
this._topBox.add(forward);
forward.connect('clicked', Lang.bind(this, this._nextMonth));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]