From 87e4a542eb21d467b102f1a00bdc0b4a8ae75f82 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 19 Sep 2021 08:13:46 -0400 Subject: [PATCH 1/2] Clean up gesture icons These had duplicate drawing in them, and were saved with all the extra Inkscape data. --- .../actions/document-open-recent-symbolic.svg | 29 ++- .../actions/gesture-pinch-symbolic.svg | 133 +------------ .../gesture-rotate-anticlockwise-symbolic.svg | 182 ++---------------- .../gesture-rotate-clockwise-symbolic.svg | 181 ++--------------- .../actions/gesture-stretch-symbolic.svg | 129 +------------ .../actions/gesture-swipe-left-symbolic.svg | 139 +------------ .../actions/gesture-swipe-right-symbolic.svg | 139 +------------ ...gesture-two-finger-swipe-left-symbolic.svg | 156 +-------------- ...esture-two-finger-swipe-right-symbolic.svg | 159 +-------------- .../actions/insert-image-symbolic.svg | 2 +- 10 files changed, 93 insertions(+), 1156 deletions(-) diff --git a/gtk/icons/scalable/actions/document-open-recent-symbolic.svg b/gtk/icons/scalable/actions/document-open-recent-symbolic.svg index 6a765349b6..433775d18c 100644 --- a/gtk/icons/scalable/actions/document-open-recent-symbolic.svg +++ b/gtk/icons/scalable/actions/document-open-recent-symbolic.svg @@ -1 +1,28 @@ - \ No newline at end of file + + + + + + + + diff --git a/gtk/icons/scalable/actions/gesture-pinch-symbolic.svg b/gtk/icons/scalable/actions/gesture-pinch-symbolic.svg index 27b5569abb..541b45377e 100644 --- a/gtk/icons/scalable/actions/gesture-pinch-symbolic.svg +++ b/gtk/icons/scalable/actions/gesture-pinch-symbolic.svg @@ -1,57 +1,17 @@ + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"> - - - @@ -60,97 +20,16 @@ image/svg+xml - - - - - - - - - - - + id="rect6515" /> diff --git a/gtk/icons/scalable/actions/gesture-rotate-anticlockwise-symbolic.svg b/gtk/icons/scalable/actions/gesture-rotate-anticlockwise-symbolic.svg index 10f4e362ad..636e104399 100644 --- a/gtk/icons/scalable/actions/gesture-rotate-anticlockwise-symbolic.svg +++ b/gtk/icons/scalable/actions/gesture-rotate-anticlockwise-symbolic.svg @@ -1,60 +1,17 @@ - - + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"> - - - @@ -63,151 +20,42 @@ image/svg+xml - + d="" /> + id="rect4211" /> + id="path4223-9" /> + id="path4225" /> - - - - - - - - - - - - diff --git a/gtk/icons/scalable/actions/gesture-rotate-clockwise-symbolic.svg b/gtk/icons/scalable/actions/gesture-rotate-clockwise-symbolic.svg index 38c44dc361..293b28359e 100644 --- a/gtk/icons/scalable/actions/gesture-rotate-clockwise-symbolic.svg +++ b/gtk/icons/scalable/actions/gesture-rotate-clockwise-symbolic.svg @@ -1,58 +1,17 @@ - - + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"> - - - @@ -61,148 +20,32 @@ image/svg+xml - - - - - - - - - - - - - - + d="m -1030.6277,653.56411 c -1.6045,-0.0695 -3.095,0.82725 -3.7852,2.27734 l -10.8965,22.0918 c -0.038,0.0587 -0.086,0.10692 -0.1211,0.16797 l -0.1504,0.26171 v -0.006 c -0.3784,0.59815 -1.14,0.48659 -1.2343,-0.31836 l 1.2441,-14.8691 c 0.1772,-1.82322 -0.9067,-3.53383 -2.6309,-4.15234 -0.037,-0.0123 -0.074,-0.024 -0.1113,-0.0352 -0.085,-0.0283 -0.171,-0.0537 -0.2578,-0.0762 -0.043,-0.0105 -0.086,-0.0202 -0.1289,-0.0293 -0.092,-0.0208 -0.1843,-0.0384 -0.2774,-0.0527 -0.037,-0.005 -0.074,-0.01 -0.1113,-0.0137 -0.09,-0.0108 -0.1794,-0.0186 -0.2695,-0.0234 -0.054,-0.002 -0.1081,-0.002 -0.1621,-0.002 -0.052,-0.002 -0.1042,-0.004 -0.1563,-0.004 -0.021,0.002 -0.041,0.004 -0.062,0.006 -0.08,0.004 -0.1603,0.0106 -0.2402,0.0195 -0.045,0.004 -0.09,0.01 -0.1348,0.0156 -0.1016,0.0144 -0.2025,0.0326 -0.3027,0.0547 -0.024,0.005 -0.048,0.0102 -0.072,0.0156 -0.036,0.007 -0.072,0.0151 -0.1074,0.0234 -1.712,0.45978 -2.917,1.99158 -2.9609,3.76367 l -2.2461,26.82813 c 0,0 -3.3106,-0.31108 -3.3106,-1.6875 v -8.9043 c 0,-2.31876 -1.784,-4.18555 -4,-4.18555 -2.216,0 -4,1.86679 -4,4.18555 v 10.62891 c 0,0.12987 0.026,0.25211 0.037,0.3789 l -0.049,0.0625 c 0,1.50871 0.1329,2.82017 0.6191,4.23438 l 0.049,0.0176 3.2578,6.46289 c 0.6629,1.41421 1.5022,2.27734 3.5351,2.27734 l 26.8047,-0.002 c 1.5463,0 3.6207,-1.06935 4.2676,-2.13286 l 8.127,-14.07422 c 1.1593,-2.00811 0.548,-4.517 -1.3711,-5.625 -1.9192,-1.108 -4.3973,-0.38311 -5.5567,1.625 l -0.3945,0.68164 -0.8672,-0.5 1.6797,-2.9082 c 1.1594,-2.00811 0.548,-4.51701 -1.3711,-5.625 -1.9191,-1.108 -4.3973,-0.38311 -5.5566,1.625 l -1.6797,2.91015 -1.0176,-0.58789 9.0156,-18.27344 c 0.1791,-0.27612 0.3234,-0.57328 0.4297,-0.88476 1.164,-2.57828 -0.6427,-5.51725 -3.4688,-5.64258 z" + id="rect4211-4" /> + id="path4223-3" /> + id="path4225-3" /> diff --git a/gtk/icons/scalable/actions/gesture-stretch-symbolic.svg b/gtk/icons/scalable/actions/gesture-stretch-symbolic.svg index 2434569ee5..877a3e2846 100644 --- a/gtk/icons/scalable/actions/gesture-stretch-symbolic.svg +++ b/gtk/icons/scalable/actions/gesture-stretch-symbolic.svg @@ -1,52 +1,17 @@ + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"> - - - - @@ -55,98 +20,16 @@ image/svg+xml - - - - - - - - - - - + id="rect4249" /> diff --git a/gtk/icons/scalable/actions/gesture-swipe-left-symbolic.svg b/gtk/icons/scalable/actions/gesture-swipe-left-symbolic.svg index 589396d0ab..42762f1df1 100644 --- a/gtk/icons/scalable/actions/gesture-swipe-left-symbolic.svg +++ b/gtk/icons/scalable/actions/gesture-swipe-left-symbolic.svg @@ -1,51 +1,17 @@ - - + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"> - - - @@ -54,109 +20,16 @@ image/svg+xml - - - - - - - - - - - - - - - diff --git a/gtk/icons/scalable/actions/gesture-swipe-right-symbolic.svg b/gtk/icons/scalable/actions/gesture-swipe-right-symbolic.svg index de452c8815..586367ee0c 100644 --- a/gtk/icons/scalable/actions/gesture-swipe-right-symbolic.svg +++ b/gtk/icons/scalable/actions/gesture-swipe-right-symbolic.svg @@ -1,51 +1,17 @@ - - + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"> - - - @@ -54,109 +20,16 @@ image/svg+xml - - - - - - - - - - - - - - - diff --git a/gtk/icons/scalable/actions/gesture-two-finger-swipe-left-symbolic.svg b/gtk/icons/scalable/actions/gesture-two-finger-swipe-left-symbolic.svg index e25947c0f3..a02d0bb3ef 100644 --- a/gtk/icons/scalable/actions/gesture-two-finger-swipe-left-symbolic.svg +++ b/gtk/icons/scalable/actions/gesture-two-finger-swipe-left-symbolic.svg @@ -1,51 +1,17 @@ - - + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"> - - - @@ -54,126 +20,16 @@ image/svg+xml - - - - - - - - - - - - - - - - diff --git a/gtk/icons/scalable/actions/gesture-two-finger-swipe-right-symbolic.svg b/gtk/icons/scalable/actions/gesture-two-finger-swipe-right-symbolic.svg index e27b4b126d..2fd4dac060 100644 --- a/gtk/icons/scalable/actions/gesture-two-finger-swipe-right-symbolic.svg +++ b/gtk/icons/scalable/actions/gesture-two-finger-swipe-right-symbolic.svg @@ -1,51 +1,17 @@ - - + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"> - - - @@ -54,126 +20,15 @@ image/svg+xml - - - - - - - - - - - - - - - - + d="m -129,475.29637 v 7 h -14.48047 c -0.8685,-2.58098 -2.88029,-4.74387 -5.63867,-5.67578 -1.15023,-0.3886 -2.3288,-0.52948 -3.47461,-0.45118 -3.16004,0.21596 -6.07335,2.10345 -7.50391,5.06055 -0.72859,-0.0926 -1.45444,-0.10529 -2.16406,-0.0215 -3.45482,0.40801 -6.51775,2.81143 -7.58203,6.33594 -1.30748,4.32992 0.83762,8.91584 4.84375,10.76757 v 18.83594 h -1 v -7.81445 c 0,-2.31876 -1.784,-4.18555 -4,-4.18555 -2.216,0 -4,1.86679 -4,4.18555 v 7.81445 8.81445 4.18555 h 4 25 11 c 2.216,0 4,-1.86679 4,-4.18555 v -12.6289 -9 c 0,-2.31876 -1.784,-4.18555 -4,-4.18555 -2.216,0 -4,1.86679 -4,4.18555 v 4.81445 h -1 v -10.81445 c 0,-2.31876 -1.784,-4.18555 -4,-4.18555 -2.216,0 -4,1.86679 -4,4.18555 v 10.81445 h -1 v -15.95703 c 2.13659,-1.06416 3.85324,-2.95852 4.60352,-5.40235 0.0502,-0.16362 0.0846,-0.32791 0.125,-0.49218 H -129 v 7 l 10,-9.5 -10,-9.5 z m -22.82812,3.84961 c 0.58024,0.0183 1.16811,0.12047 1.74804,0.3164 2.47175,0.83508 4.03799,3.09857 4.08008,5.56641 v 0.23242 c -0.012,0.54544 -0.0952,1.09784 -0.26367,1.64649 -0.33419,1.08853 -0.94913,2.00757 -1.73633,2.71289 v -4.28711 c 0,-2.31876 -1.784,-4.18555 -4,-4.18555 -2.216,0 -4,1.86679 -4,4.18555 v 7.75976 c -0.27497,0.49163 -0.61337,0.93164 -1,1.31641 v -4.07617 c 0,-2.31876 -1.784,-4.18555 -4,-4.18555 -2.216,0 -4,1.86679 -4,4.18555 v 4.48242 c -1.84972,-1.48636 -2.70286,-3.98414 -1.97266,-6.40235 0.95426,-3.16014 4.23426,-4.94531 7.40625,-4.03125 a 1.50015,1.50015 0 0 0 1.92774,-1.28906 1.5004025,1.5004025 0 0 0 0.01,-0.0234 c 0.91888,-2.48834 3.28636,-4.00326 5.80078,-3.92383 z M -156,497.45066 v 11.69727 h -1 v -11.07227 c 0.34667,-0.1849 0.67956,-0.39643 1,-0.625 z" + id="rect6513" /> diff --git a/gtk/icons/scalable/actions/insert-image-symbolic.svg b/gtk/icons/scalable/actions/insert-image-symbolic.svg index c7a3ee08f6..beda4fed2c 100644 --- a/gtk/icons/scalable/actions/insert-image-symbolic.svg +++ b/gtk/icons/scalable/actions/insert-image-symbolic.svg @@ -1 +1 @@ - \ No newline at end of file + From e1facc548ad579410d79a3fa53093aba4675383f Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 19 Sep 2021 08:26:14 -0400 Subject: [PATCH 2/2] resources: Treat svgs as xml They can have their whitespace removed just the same. --- gtk/gen-gtk-gresources-xml.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gtk/gen-gtk-gresources-xml.py b/gtk/gen-gtk-gresources-xml.py index 81c06637bc..179761a154 100644 --- a/gtk/gen-gtk-gresources-xml.py +++ b/gtk/gen-gtk-gresources-xml.py @@ -55,7 +55,7 @@ for f in get_files('theme/Default/assets', '.png'): xml += '\n' for f in get_files('theme/Default/assets', '.svg'): - xml += ' theme/Default/assets/{0}\n'.format(f) + xml += ' theme/Default/assets/{0}\n'.format(f) for f in get_files('theme/Default/assets-hc', '.png'): xml += ' theme/Default/assets-hc/{0}\n'.format(f) @@ -63,10 +63,10 @@ for f in get_files('theme/Default/assets-hc', '.png'): xml += '\n' for f in get_files('theme/Default/assets-hc', '.svg'): - xml += ' theme/Default/assets-hc/{0}\n'.format(f) + xml += ' theme/Default/assets-hc/{0}\n'.format(f) for f in get_files('ui', '.ui'): - xml += ' ui/{0}\n'.format(f) + xml += ' ui/{0}\n'.format(f) xml += '\n' @@ -77,7 +77,7 @@ for s in ['16x16', '32x32', '64x64', 'scalable']: for f in get_files(icons_dir, '.png'): xml += ' icons/{0}/{1}/{2}\n'.format(s,c,f) for f in get_files(icons_dir, '.svg'): - xml += ' icons/{0}/{1}/{2}\n'.format(s,c,f) + xml += ' icons/{0}/{1}/{2}\n'.format(s,c,f) for f in get_files('inspector', '.ui'): xml += ' inspector/{0}\n'.format(f)