data: Replace png with svg files

This commit is contained in:
Corentin Noël 2016-12-31 09:08:58 +01:00 committed by Rico Tzschichholz
parent 12f47ed258
commit 9665ae90d6
8 changed files with 424 additions and 6 deletions

View File

@ -3,7 +3,7 @@ SUBDIRS = \
$(NULL)
stylesdir = $(pkgdatadir)
styles_DATA = gala.css texture.png close.png
styles_DATA = gala.css texture.png close.svg
applicationsdir = $(datadir)/applications
applications_DATA = gala.desktop gala-wayland.desktop gala-other.desktop gala-multitaskingview.desktop
@ -28,7 +28,7 @@ EXTRA_DIST = \
gala-other.desktop.in \
gala-multitaskingview.desktop.in \
texture.png \
close.png \
close.svg \
org.pantheon.desktop.gala.gschema.xml.in.in \
$(NULL)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

175
data/close.svg Normal file
View File

@ -0,0 +1,175 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:osb="http://www.openswatchbook.org/uri/2009/osb"
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"
version="1.1"
id="svg2"
height="36"
width="36">
<defs
id="defs4">
<linearGradient
id="linearGradient5827">
<stop
id="stop5829"
offset="0"
style="stop-color:#000000;stop-opacity:1;" />
<stop
style="stop-color:#000000;stop-opacity:0.49411765;"
offset="0.80939096"
id="stop5835" />
<stop
id="stop5831"
offset="1"
style="stop-color:#000000;stop-opacity:0;" />
</linearGradient>
<linearGradient
id="linearGradient5714">
<stop
id="stop5716"
offset="0"
style="stop-color:#000000;stop-opacity:0.79912664" />
<stop
id="stop5718"
offset="1"
style="stop-color:#000000;stop-opacity:1" />
</linearGradient>
<linearGradient
osb:paint="solid"
id="linearGradient8590">
<stop
id="stop8592"
offset="0"
style="stop-color:#000000;stop-opacity:1;" />
</linearGradient>
<linearGradient
id="linearGradient4011-28">
<stop
id="stop4013-26"
style="stop-color:#ffffff;stop-opacity:1;"
offset="0" />
<stop
offset="0.507761"
style="stop-color:#ffffff;stop-opacity:0.23529412;"
id="stop4015-7" />
<stop
id="stop4017-0"
style="stop-color:#ffffff;stop-opacity:0.15686275;"
offset="0.83456558" />
<stop
id="stop4019-9"
style="stop-color:#ffffff;stop-opacity:0.39215687;"
offset="1" />
</linearGradient>
<linearGradient
id="linearGradient7232-8-8-68-3">
<stop
id="stop7234-8-8-5-3"
style="stop-color:#7e7e7e;stop-opacity:1;"
offset="0" />
<stop
id="stop7236-3-00-8-3"
style="stop-color:#3e3e3e;stop-opacity:1;"
offset="1" />
</linearGradient>
<linearGradient
y2="607.51257"
x2="721.04901"
y1="583.98163"
x1="721.04901"
gradientTransform="matrix(0.47559079,0,0,1.454704,-230.86429,-383.79963)"
gradientUnits="userSpaceOnUse"
id="linearGradient5190"
xlink:href="#linearGradient7232-8-8-68-3" />
<linearGradient
x1="71.204407"
y1="6.2375584"
x2="71.204407"
y2="44.340794"
id="linearGradient3089-9"
xlink:href="#linearGradient4011-28"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.78378373,0,0,0.78378373,52.776438,464.50041)" />
<linearGradient
gradientUnits="userSpaceOnUse"
y2="500.487"
x2="109.62553"
y1="468.96909"
x1="109.62553"
id="linearGradient5720"
xlink:href="#linearGradient5714" />
<radialGradient
gradientUnits="userSpaceOnUse"
r="18"
fy="485.375"
fx="109"
cy="485.375"
cx="109"
id="radialGradient5833"
xlink:href="#linearGradient5827" />
<radialGradient
gradientTransform="matrix(0.94444444,0,0,0.94444444,6.0555566,25.965278)"
gradientUnits="userSpaceOnUse"
r="18"
fy="485.375"
fx="109"
cy="485.375"
cx="109"
id="radialGradient5833-9"
xlink:href="#linearGradient5827" />
</defs>
<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
transform="translate(-91,-467.375)"
id="layer1">
<path
d="m 109.00003,467.375 c -9.93187,0 -18.00003,8.06821 -18.00003,18 0,9.93179 8.06816,18 18.00003,18 9.93176,0 18,-8.06821 17.99997,-18 0,-9.93179 -8.06821,-18 -17.99997,-18 z"
id="path2555-7-1-4-4-8-6-5-1-0-2-9-5"
style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:url(#radialGradient5833);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.99999982;marker:none;enable-background:accumulate;opacity:0.7" />
<path
d="m 109.00003,467.375 c -9.3801,0 -17.000029,7.61998 -17.000029,17 0,9.38002 7.619929,17 17.000029,17 9.37999,0 17,-7.61998 16.99997,-17 0,-9.38002 -7.61998,-17 -16.99997,-17 z"
id="path2555-7-1-4-4-8-6-5-1-0-2-9-5-9"
style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:0.7;fill:url(#radialGradient5833-9);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.99999982;marker:none;enable-background:accumulate" />
<path
d="m 109.00002,469.375 c -8.27655,0 -15.000019,6.72351 -15.000019,15 0,8.27649 6.723469,15 15.000019,15 8.27647,0 15,-6.72351 14.99998,-15 0,-8.27649 -6.72351,-15 -14.99998,-15 z"
id="path2555-7-1-4-4-8-6-5-1-0-2-9"
style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:url(#linearGradient5190);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.99999982;marker:none;enable-background:accumulate" />
<path
d="m 124.5,484.375 c 0,-8.56039 -6.9396,-15.5 -15.50007,-15.5 -8.5604,0 -15.499928,6.93961 -15.499928,15.5 0,8.56038 6.939528,15.5 15.499928,15.5 8.56047,0 15.50007,-6.93962 15.50007,-15.5 z"
id="path3019-2-0-4-7-1-46-65-2-0"
style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:0.6;fill:none;stroke:url(#linearGradient5720);stroke-width:0.99999988;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate" />
<path
style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:0.2;fill:none;stroke:url(#linearGradient3089-9);stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate"
id="path8655-2"
d="m 123.5,484.37448 c 0,8.0084 -6.49236,14.50052 -14.49983,14.50052 -8.00819,0 -14.50017,-6.4922 -14.50017,-14.50052 0,-8.00801 6.49198,-14.49948 14.50017,-14.49948 8.00747,0 14.49983,6.49147 14.49983,14.49948 l 0,0 z" />
<path
d="m 104.58008,478.375 c -0.66357,0 -1.33178,0.26145 -1.83203,0.76172 -1.00181,1.00181 -1.0018,2.66225 0,3.66406 l 2.58789,2.58594 -2.58789,2.58789 c -1.00181,1.00181 -1.00181,2.66225 0,3.66406 1.00181,1.00181 2.66226,1.00183 3.66406,0 L 109,489.05078 l 2.58789,2.58789 c 1.0018,1.00184 2.66226,1.00183 3.66406,0 1.00183,-1.00181 1.00183,-2.66225 0,-3.66406 l -2.58789,-2.58789 2.58789,-2.58594 c 1.00181,-1.00181 1.00182,-2.66226 0,-3.66406 -1.0018,-1.00182 -2.66226,-1.00182 -3.66406,0 L 109,481.72461 l -2.58789,-2.58789 c -0.50025,-0.50026 -1.16846,-0.76172 -1.83203,-0.76172 z"
id="path5787"
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:0.05;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate;filter-blend-mode:normal;filter-gaussianBlur-deviation:0" />
<path
id="rect5962-1"
d="m 104.58008,479.4669 c -0.38343,0 -0.76675,0.1476 -1.06055,0.44141 -0.5876,0.5876 -0.5876,1.53348 0,2.12109 l 3.35938,3.35742 -3.35938,3.35938 c -0.5876,0.5876 -0.5876,1.53349 0,2.12109 0.58761,0.58761 1.53349,0.58761 2.12109,0 L 109,487.50792 l 3.35938,3.35937 c 0.5876,0.58761 1.53349,0.58761 2.12109,0 0.58761,-0.5876 0.58761,-1.53349 0,-2.12109 l -3.35938,-3.35938 3.35938,-3.35742 c 0.58761,-0.58761 0.58761,-1.53349 0,-2.12109 -0.5876,-0.58761 -1.53349,-0.58761 -2.12109,0 L 109,483.26768 l -3.35938,-3.35937 c -0.2938,-0.29381 -0.67711,-0.44141 -1.06054,-0.44141 z"
style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:0.15;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;enable-background:accumulate;clip-rule:nonzero;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;filter-blend-mode:normal;filter-gaussianBlur-deviation:0;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto" />
<path
transform="translate(91,467.375)"
id="rect5962"
d="M 13.580078 11.091797 C 13.196649 11.091797 12.813334 11.2394 12.519531 11.533203 C 11.931926 12.120809 11.931926 13.066691 12.519531 13.654297 L 15.878906 17.011719 L 12.519531 20.371094 C 11.931926 20.958699 11.931926 21.904582 12.519531 22.492188 C 13.107137 23.079793 14.053019 23.079793 14.640625 22.492188 L 18 19.132812 L 21.359375 22.492188 C 21.946981 23.079793 22.892863 23.079793 23.480469 22.492188 C 24.068074 21.904582 24.068074 20.958699 23.480469 20.371094 L 20.121094 17.011719 L 23.480469 13.654297 C 24.068074 13.066691 24.068074 12.120809 23.480469 11.533203 C 22.892863 10.945597 21.946981 10.945597 21.359375 11.533203 L 18 14.892578 L 14.640625 11.533203 C 14.346822 11.2394 13.963507 11.091797 13.580078 11.091797 z "
style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;marker:none;enable-background:accumulate" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 9.9 KiB

View File

@ -294,7 +294,7 @@ namespace Gala
{
if (close_pixbuf == null) {
try {
close_pixbuf = new Gdk.Pixbuf.from_file (Config.PKGDATADIR + "/close.png");
close_pixbuf = new Gdk.Pixbuf.from_file_at_scale (Config.PKGDATADIR + "/close.svg", -1, 36, true);
} catch (Error e) {
warning (e.message);
return null;

View File

@ -3,7 +3,7 @@ include $(top_srcdir)/Makefile.common
VAPIDIR = $(top_srcdir)/vapi
imagedir = $(pkgdatadir)
dist_image_DATA = data/image-mask.png
dist_image_DATA = data/image-mask.svg
BUILT_SOURCES = libgala_notify_la_vala.stamp

View File

@ -52,6 +52,7 @@ namespace Gala.Plugins.Notify
const string FALLBACK_APP_ID = "gala-other";
static Gdk.RGBA? icon_fg_color = null;
static Gdk.Pixbuf? image_mask_pixbuf = null;
[DBus (visible = false)]
public signal void show_notification (Notification notification);
@ -418,8 +419,15 @@ namespace Gala.Plugins.Notify
cr.reset_clip ();
var mask = new Cairo.ImageSurface.from_png (Config.PKGDATADIR + "/image-mask.png");
cr.set_source_surface (mask, 0, 0);
if (image_mask_pixbuf == null) {
try {
image_mask_pixbuf = new Gdk.Pixbuf.from_file_at_scale (Config.PKGDATADIR + "/image-mask.svg", -1, mask_size, true);
} catch (Error e) {
warning (e.message);
}
}
Gdk.cairo_set_source_pixbuf (cr, image_mask_pixbuf, 0, 0);
cr.paint ();
pixbuf = Gdk.pixbuf_get_from_surface (surface, 0, 0, mask_size, mask_size);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 542 B

View File

@ -0,0 +1,235 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<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"
width="48"
height="48"
id="svg2"
version="1.1">
<defs
id="defs4">
<linearGradient
x1="45.447727"
y1="92.539597"
x2="45.447727"
y2="7.0165396"
id="ButtonShadow-9"
gradientUnits="userSpaceOnUse"
gradientTransform="scale(1.0058652,0.994169)">
<stop
id="stop3750-3"
style="stop-color:#000000;stop-opacity:1"
offset="0" />
<stop
id="stop3752-1"
style="stop-color:#000000;stop-opacity:0.58823532"
offset="1" />
</linearGradient>
<filter
id="filter3174-4"
style="color-interpolation-filters:sRGB">
<feGaussianBlur
id="feGaussianBlur3176-5"
stdDeviation="1.71" />
</filter>
<linearGradient
x1="45.447727"
y1="92.539597"
x2="45.447727"
y2="7.0165396"
id="ButtonShadow"
gradientUnits="userSpaceOnUse"
gradientTransform="scale(1.0058652,0.994169)">
<stop
id="stop3750-9"
style="stop-color:#000000;stop-opacity:1"
offset="0" />
<stop
id="stop3752-7"
style="stop-color:#000000;stop-opacity:0.58823532"
offset="1" />
</linearGradient>
<filter
id="filter3174"
style="color-interpolation-filters:sRGB">
<feGaussianBlur
id="feGaussianBlur3176"
stdDeviation="1.71" />
</filter>
<linearGradient
xlink:href="#ButtonShadow-9"
id="linearGradient6176"
gradientUnits="userSpaceOnUse"
gradientTransform="scale(1.0058652,0.994169)"
x1="45.447727"
y1="92.539597"
x2="45.447727"
y2="7.0165396" />
<linearGradient
xlink:href="#ButtonShadow"
id="linearGradient6178"
gradientUnits="userSpaceOnUse"
gradientTransform="scale(1.0058652,0.994169)"
x1="45.447727"
y1="92.539597"
x2="45.447727"
y2="7.0165396" />
<linearGradient
id="linearGradient3688-464-309-9-2-4-2">
<stop
offset="0"
style="stop-color:#181818;stop-opacity:1"
id="stop2889-7-9-6-9" />
<stop
offset="1"
style="stop-color:#181818;stop-opacity:0"
id="stop2891-6-6-1-7" />
</linearGradient>
<linearGradient
gradientTransform="matrix(1.1578952,0,0,0.6428571,-3.78948,16.2857)"
gradientUnits="userSpaceOnUse"
xlink:href="#linearGradient3702-501-757-8-4-1-1-9"
id="linearGradient6084"
y2="39.999443"
x2="25.058096"
y1="47.027729"
x1="25.058096" />
<linearGradient
id="linearGradient3702-501-757-8-4-1-1-9">
<stop
offset="0"
style="stop-color:#181818;stop-opacity:0"
id="stop2895-8-9-9-1-4" />
<stop
offset="0.5"
style="stop-color:#181818;stop-opacity:1"
id="stop2897-7-8-7-7-3" />
<stop
offset="1"
style="stop-color:#181818;stop-opacity:0"
id="stop2899-4-5-1-5-6" />
</linearGradient>
<linearGradient
gradientTransform="translate(0,1)"
gradientUnits="userSpaceOnUse"
xlink:href="#linearGradient3924-1-7-54"
id="linearGradient3028-82"
y2="43"
x2="23.99999"
y1="4.999989"
x1="23.99999" />
<linearGradient
id="linearGradient3924-1-7-54">
<stop
offset="0"
style="stop-color:#ffffff;stop-opacity:1"
id="stop3926-3-4-4" />
<stop
offset="0.06316455"
style="stop-color:#ffffff;stop-opacity:0.23529412"
id="stop3928-91-41-8" />
<stop
offset="0.95056331"
style="stop-color:#ffffff;stop-opacity:0.15686275"
id="stop3930-6-6-6" />
<stop
offset="1"
style="stop-color:#ffffff;stop-opacity:0.39215687"
id="stop3932-6-6-7" />
</linearGradient>
<radialGradient
gradientTransform="matrix(2.3201719,0,0,0.89999994,28.617841,5.0999865)"
gradientUnits="userSpaceOnUse"
xlink:href="#linearGradient3688-464-309-9-2-4-2"
id="radialGradient3013-3"
fy="43.5"
fx="4.9929786"
r="2.5"
cy="43.5"
cx="4.9929786" />
<radialGradient
gradientTransform="matrix(-2.3201719,0,0,-0.89999994,19.382168,83.399981)"
gradientUnits="userSpaceOnUse"
xlink:href="#linearGradient3688-464-309-9-2-4-2"
id="radialGradient3015-3"
fy="43.5"
fx="4.9929786"
r="2.5"
cy="43.5"
cx="4.9929786" />
</defs>
<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
transform="translate(906.27272,-451.79544)"
style="display:none"
id="layer2">
<rect
style="opacity:0.9;fill:url(#linearGradient6178);fill-opacity:1;fill-rule:nonzero;stroke:none;filter:url(#filter3174)"
id="rect3745"
y="7"
x="5"
ry="6"
rx="6"
height="85"
width="86" />
</g>
<g
transform="translate(903,-452.15908)"
style="display:none"
id="layer2-4">
<rect
style="opacity:0.9;fill:url(#linearGradient6176);fill-opacity:1;fill-rule:nonzero;stroke:none;filter:url(#filter3174-4)"
id="rect3745-5"
y="7"
x="5"
ry="6"
rx="6"
height="85"
width="86" />
</g>
<rect
width="37"
height="37"
rx="1"
ry="1"
x="5.5"
y="6.4999828"
id="rect6741-11-6"
style="opacity:0.4;fill:none;stroke:url(#linearGradient3028-82);stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
<rect
width="39"
height="39"
rx="2"
ry="2"
x="4.5"
y="5.4999828"
id="rect5505-21-3-2-7-4"
style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:0.3;fill:none;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate" />
<path
id="rect4188"
d="M 7.7890625 45 L 7.7890625 46.5 L 40.210938 46.5 L 40.210938 45 L 7.7890625 45 z "
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:0.3;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:url(#linearGradient6084);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate;filter-blend-mode:normal;filter-gaussianBlur-deviation:0" />
<path
id="rect2801-3"
d="M 44 42 L 44 42.5 C 44 43.885 42.885 45 41.5 45 L 40.210938 45 L 40.210938 46.5 L 46 46.5 L 46 42 L 44 42 z "
style="fill:url(#radialGradient3013-3);fill-opacity:1;stroke:none;opacity:0.3" />
<path
id="rect3696-6"
d="M 2 42 L 2 46.5 L 7.7890625 46.5 L 7.7890625 45 L 6.5 45 C 5.115 45 4 43.885 4 42.5 L 4 42 L 2 42 z "
style="fill:url(#radialGradient3015-3);fill-opacity:1;stroke:none;opacity:0.3" />
</svg>

After

Width:  |  Height:  |  Size: 7.7 KiB