gnome-shell/0016-theme-Replace-calendar-arrow-images-with-symbolic-ic.patch

258 lines
9.1 KiB
Diff

From 3217c10ff272f44d50afc881ce2a2dbb911dc1e8 Mon Sep 17 00:00:00 2001
From: daniruiz <daniruizdealegria@gmail.com>
Date: Tue, 20 Nov 2018 17:55:31 +0100
Subject: [PATCH 16/25] theme: Replace calendar arrow images with symbolic
icons and CSS
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/301
---
data/gnome-shell-theme.gresource.xml | 2 -
data/theme/calendar-arrow-left.svg | 82 ------------------------
data/theme/calendar-arrow-right.svg | 82 ------------------------
data/theme/gnome-shell-sass/_common.scss | 10 +--
js/ui/calendar.js | 2 +
5 files changed, 4 insertions(+), 174 deletions(-)
delete mode 100644 data/theme/calendar-arrow-left.svg
delete mode 100644 data/theme/calendar-arrow-right.svg
diff --git a/data/gnome-shell-theme.gresource.xml b/data/gnome-shell-theme.gresource.xml
index 4a4a0edfc..b77825414 100644
--- a/data/gnome-shell-theme.gresource.xml
+++ b/data/gnome-shell-theme.gresource.xml
@@ -1,8 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
<gresource prefix="/org/gnome/shell/theme">
- <file>calendar-arrow-left.svg</file>
- <file>calendar-arrow-right.svg</file>
<file>calendar-today.svg</file>
<file>checkbox-focused.svg</file>
<file>checkbox-off-focused.svg</file>
diff --git a/data/theme/calendar-arrow-left.svg b/data/theme/calendar-arrow-left.svg
deleted file mode 100644
index d5d97b3c3..000000000
--- a/data/theme/calendar-arrow-left.svg
+++ /dev/null
@@ -1,82 +0,0 @@
-<?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
deleted file mode 100644
index 545da7ec5..000000000
--- a/data/theme/calendar-arrow-right.svg
+++ /dev/null
@@ -1,82 +0,0 @@
-<?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-sass/_common.scss b/data/theme/gnome-shell-sass/_common.scss
index 528202161..22f9e826e 100644
--- a/data/theme/gnome-shell-sass/_common.scss
+++ b/data/theme/gnome-shell-sass/_common.scss
@@ -938,7 +938,6 @@ StScrollBar {
}
.pager-button {
- color: white;
background-color: transparent;
width: 32px;
border-radius: 4px;
@@ -946,13 +945,8 @@ StScrollBar {
&:active { background-color: transparentize($bg_color,0.95); }
}
- .calendar-change-month-back { //arrow back
- background-image: url("resource:///org/gnome/shell/theme/calendar-arrow-left.svg");
- &:rtl { background-image: url("resource:///org/gnome/shell/theme/calendar-arrow-right.svg"); }
- }
- .calendar-change-month-forward { //arrow foreward
- background-image: url("resource:///org/gnome/shell/theme/calendar-arrow-right.svg");
- &:rtl { background-image: url("resource:///org/gnome/shell/theme/calendar-arrow-left.svg"); }
+ .calendar-change-month-back StIcon, .calendar-change-month-forward StIcon { // arrows
+ icon-size: 1.09em;
}
.calendar-day-base {
diff --git a/js/ui/calendar.js b/js/ui/calendar.js
index 432986391..c4d362537 100644
--- a/js/ui/calendar.js
+++ b/js/ui/calendar.js
@@ -446,6 +446,7 @@ var Calendar = new Lang.Class({
this._backButton = new St.Button({ style_class: 'calendar-change-month-back pager-button',
accessible_name: _("Previous month"),
can_focus: true });
+ this._backButton.add_actor(new St.Icon({ icon_name: 'pan-start-symbolic' }));
this._topBox.add(this._backButton);
this._backButton.connect('clicked', this._onPrevMonthButtonClicked.bind(this));
@@ -456,6 +457,7 @@ var Calendar = new Lang.Class({
this._forwardButton = new St.Button({ style_class: 'calendar-change-month-forward pager-button',
accessible_name: _("Next month"),
can_focus: true });
+ this._forwardButton.add_actor(new St.Icon({ icon_name: 'pan-end-symbolic' }));
this._topBox.add(this._forwardButton);
this._forwardButton.connect('clicked', this._onNextMonthButtonClicked.bind(this));
--
2.20.0