Adjust spacing to pixel align cursor shape

This commit is contained in:
Seth Hillbrand 2020-12-07 16:28:05 -08:00
parent 77788983a7
commit 638790f673
2 changed files with 206 additions and 75 deletions

View File

@ -8,26 +8,24 @@
static const unsigned char png[] = {
0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52,
0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x1a, 0x08, 0x06, 0x00, 0x00, 0x00, 0xa9, 0x4a, 0x4c,
0xce, 0x00, 0x00, 0x01, 0x1f, 0x49, 0x44, 0x41, 0x54, 0x48, 0xc7, 0xed, 0x96, 0x3d, 0x0a, 0xc2,
0x40, 0x10, 0x46, 0x15, 0x6c, 0xb4, 0xb1, 0x4f, 0x6d, 0x29, 0x78, 0x00, 0x9b, 0x58, 0x59, 0xa5,
0xc8, 0x1f, 0xe4, 0x08, 0xd6, 0x16, 0xd6, 0x8a, 0xe8, 0x11, 0x3c, 0x80, 0xe4, 0x04, 0xf6, 0x82,
0xa0, 0x8d, 0xb5, 0x9d, 0x11, 0x03, 0x06, 0x23, 0x24, 0x17, 0xd0, 0xc6, 0x71, 0x3e, 0x48, 0x0a,
0x45, 0x05, 0x65, 0xa7, 0xd2, 0xc0, 0x23, 0x09, 0xec, 0xee, 0xcb, 0xee, 0xec, 0xcc, 0xa6, 0x50,
0xf8, 0xf9, 0x2b, 0x4d, 0xd3, 0x25, 0x10, 0x17, 0x25, 0x49, 0x42, 0x40, 0x5c, 0x14, 0xc7, 0x31,
0x01, 0x71, 0x51, 0x14, 0x1d, 0x08, 0x88, 0x8b, 0xc2, 0x70, 0x4f, 0x40, 0x5c, 0x14, 0x04, 0x5b,
0x02, 0xe2, 0xa2, 0xf6, 0x64, 0x4d, 0x40, 0x5c, 0xa4, 0x0d, 0x56, 0x04, 0xfe, 0xa2, 0xbb, 0x8c,
0x47, 0x22, 0x22, 0x47, 0xb0, 0x7d, 0xb1, 0xb3, 0x10, 0x74, 0xc4, 0x23, 0x1f, 0xfc, 0x15, 0x68,
0x83, 0xb6, 0xe8, 0x83, 0xbe, 0x18, 0x03, 0x63, 0x3d, 0xad, 0x20, 0x9f, 0x88, 0x9a, 0x9d, 0x11,
0x69, 0xfd, 0xe5, 0x77, 0xa2, 0x4f, 0x96, 0xce, 0x71, 0x1c, 0xb2, 0x6d, 0x7b, 0xaa, 0xeb, 0x7a,
0x49, 0x34, 0x46, 0x10, 0x01, 0xd7, 0x75, 0x67, 0x4c, 0x59, 0x5c, 0x94, 0xb1, 0x60, 0x59, 0x55,
0x24, 0x61, 0x1f, 0x44, 0x98, 0xd9, 0xc6, 0xf3, 0x3c, 0x4d, 0x79, 0x09, 0x7a, 0x14, 0x65, 0xec,
0x59, 0x58, 0x53, 0x5a, 0x54, 0x5f, 0x88, 0xc0, 0xc9, 0x34, 0xcd, 0x86, 0xb2, 0x63, 0xe2, 0x89,
0xe0, 0xc8, 0x8c, 0x99, 0x1e, 0xcf, 0xca, 0x51, 0x76, 0xf0, 0xe5, 0x02, 0xde, 0xe2, 0xbb, 0xec,
0xf9, 0xa2, 0x3c, 0x46, 0x9c, 0x88, 0x57, 0xfe, 0x6a, 0x6c, 0x80, 0x2e, 0x2f, 0x53, 0x9d, 0x25,
0xd7, 0x4c, 0x36, 0x54, 0xfe, 0x73, 0xe2, 0xfb, 0x7e, 0x90, 0xbf, 0xb3, 0x60, 0x9e, 0xc7, 0x47,
0xb4, 0xc8, 0x5a, 0x96, 0xd5, 0x62, 0xc9, 0x19, 0x42, 0xf1, 0x8a, 0x6e, 0x18, 0x46, 0x85, 0x6f,
0xc5, 0x77, 0x6d, 0x6e, 0xa9, 0xa3, 0x51, 0x72, 0x69, 0x55, 0x94, 0x34, 0x00, 0x00, 0x00, 0x00,
0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82,
0xce, 0x00, 0x00, 0x01, 0x03, 0x49, 0x44, 0x41, 0x54, 0x48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 0x0e, 0xbe, 0x03, 0x65, 0xff, 0xa4, 0x7a, 0x1c, 0x81, 0x00, 0xd0, 0xd5,
0xa0, 0x04, 0x50, 0x04, 0x0c, 0x26, 0x1d, 0xa0, 0x25, 0xff, 0xa0, 0x96, 0x35, 0x53, 0xdd, 0xa2,
0x09, 0x13, 0x26, 0xfc, 0x47, 0xf2, 0xdd, 0x5e, 0x58, 0xfc, 0xd0, 0xb4, 0xe2, 0x0b, 0x0a, 0x0a,
0x72, 0x04, 0x5a, 0xf2, 0x03, 0x64, 0x21, 0xcd, 0x6b, 0x58, 0x5f, 0x5f, 0x5f, 0x2e, 0x20, 0xc5,
0x48, 0x0b, 0x8b, 0xc8, 0x6a, 0x40, 0x02, 0x00, 0x09, 0x09, 0x25, 0x82, 0x1b, 0xad, 0x5b, 0x90,
0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82,
};
const BITMAP_OPAQUE cursor_shape_xpm[1] = {{ png, sizeof( png ), "cursor_shape_xpm" }};

View File

@ -1,63 +1,196 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns:dc="http://purl.org/dc/elements/1.1/"
<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" id="Слой_1" data-name="Слой 1" viewBox="0 0 26 26" version="1.1" sodipodi:docname="cursor_shape.svg" inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)">
<metadata id="metadata2369">
<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>cursor_shape</dc:title>
<cc:license rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
</cc:Work>
<cc:License rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
<cc:permits rdf:resource="http://creativecommons.org/ns#Reproduction" />
<cc:permits rdf:resource="http://creativecommons.org/ns#Distribution" />
<cc:requires rdf:resource="http://creativecommons.org/ns#Notice" />
<cc:requires rdf:resource="http://creativecommons.org/ns#Attribution" />
<cc:permits rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
<cc:requires rdf:resource="http://creativecommons.org/ns#ShareAlike" />
</cc:License>
</rdf:RDF>
</metadata>
<sodipodi:namedview pagecolor="#ffffff" bordercolor="#666666" borderopacity="1" objecttolerance="10" gridtolerance="10" guidetolerance="10" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="2020" inkscape:window-height="1629" id="namedview2367" showgrid="true" inkscape:zoom="32" inkscape:cx="15.578448" inkscape:cy="15.290238" inkscape:window-x="1453" inkscape:window-y="97" inkscape:window-maximized="0" inkscape:current-layer="Слой_1">
<inkscape:grid type="xygrid" id="grid2947" />
</sodipodi:namedview>
<defs id="defs2348">
<linearGradient id="linearGradient2979" x1="12.7662" y1="2.0027" x2="12.7662" y2="10.3611" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#ececec" id="stop2975" />
<stop offset="1" stop-color="#c6c6c5" id="stop2977" />
</linearGradient>
<style id="style2338">.cls-1{fill:url(#Безымянный_градиент_19);}.cls-2{fill:url(#Безымянный_градиент_19-2);}.cls-3{fill:url(#Безымянный_градиент_19-3);}.cls-4{fill:url(#Безымянный_градиент_19-4);}.cls-5{fill:#1a81c4;}.cls-6{fill:#545454;}</style>
<linearGradient id=езымянный_градиент_19" x1="12.7662" y1="2.0027" x2="12.7662" y2="10.3611" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#ececec" id="stop2340" />
<stop offset="1" stop-color="#c6c6c5" id="stop2342" />
</linearGradient>
<linearGradient id=езымянный_градиент_19-2" x1="12.7525" y1="23.0164" x2="12.7525" y2="14.658" xlink:href="#Безымянный_градиент_19" />
<linearGradient id=езымянный_градиент_19-3" x1="15.5046" y1="2.2432" x2="15.5046" y2="10.6016" gradientTransform="translate(25.5094 -2.5136) rotate(90)" xlink:href="#Безымянный_градиент_19" />
<linearGradient id=езымянный_градиент_19-4" x1="15.4919" y1="23.5134" x2="15.4919" y2="14.8985" gradientTransform="translate(25.5094 -2.5136) rotate(90)" xlink:href="#Безымянный_градиент_19" />
<linearGradient inkscape:collect="always" xlink:href="#linearGradient2979" id="linearGradient2987" x1="3" y1="13" x2="13" y2="13" gradientUnits="userSpaceOnUse" />
<linearGradient inkscape:collect="always" xlink:href="#linearGradient2979" id="linearGradient2991" gradientUnits="userSpaceOnUse" x1="3" y1="13" x2="13" y2="13" gradientTransform="rotate(180,13,13)" />
<linearGradient inkscape:collect="always" xlink:href="#linearGradient2979" id="linearGradient3003" gradientUnits="userSpaceOnUse" x1="3" y1="13" x2="13" y2="13" />
<linearGradient inkscape:collect="always" xlink:href="#linearGradient2979" id="linearGradient3005" gradientUnits="userSpaceOnUse" gradientTransform="rotate(180,13,13)" x1="3" y1="13" x2="13" y2="13" />
</defs>
<title id="title2350">cursor_shape</title>
<g id="g3013">
<g id="g2995">
<path style="fill:none;stroke:url(#linearGradient2987);stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none" d="M 3,13 H 13" id="path2965" sodipodi:nodetypes="cc" />
<path style="fill:none;stroke:url(#linearGradient2991);stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" d="M 23,13 H 13" id="path2989" sodipodi:nodetypes="cc" />
</g>
<g id="g3001" transform="rotate(-90,13,13)">
<path style="fill:none;stroke:url(#linearGradient3003);stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" d="M 3,13 H 13" id="path2997" sodipodi:nodetypes="cc" />
<path style="fill:none;stroke:url(#linearGradient3005);stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" d="M 23,13 H 13" id="path2999" sodipodi:nodetypes="cc" />
</g>
</g>
<path style="fill:none;stroke:#1a81c4;stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none" d="m 9,13 h 8" id="path3015" />
<path style="fill:none;stroke:#1a81c4;stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" d="M 13,17 V 9" id="path3017" />
<path class="cls-6" d="m 13,13 -9.32e-4,10.882159 2.415252,-2.312217 c 0.325669,0.741356 0.803185,1.836142 1.220872,2.791856 a 1.2338,1.2338 0 0 0 1.627633,0.634824 v 0 a 1.2337,1.2337 0 0 0 0.635719,-1.623937 c -0.417615,-0.955901 -0.895724,-2.05243 -1.222119,-2.796018 l 3.337183,-0.213478 z" id="path25" style="fill:#545454" />
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
id="Слой_1"
data-name="Слой 1"
viewBox="0 0 26 26"
version="1.1"
sodipodi:docname="cursor_shape.svg"
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)"
inkscape:export-filename="/tmp/cursor_shape.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96">
<metadata
id="metadata2369">
<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>cursor_shape</dc:title>
<cc:license
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
</cc:Work>
<cc:License
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
<cc:permits
rdf:resource="http://creativecommons.org/ns#Reproduction" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#Distribution" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Notice" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Attribution" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
</cc:License>
</rdf:RDF>
</metadata>
<sodipodi:namedview
pagecolor="#f5f5f5"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="2285"
inkscape:window-height="1629"
id="namedview2367"
showgrid="true"
inkscape:zoom="45.254834"
inkscape:cx="12.402071"
inkscape:cy="11.624552"
inkscape:window-x="1453"
inkscape:window-y="97"
inkscape:window-maximized="0"
inkscape:current-layer="Слой_1"
inkscape:document-rotation="0">
<inkscape:grid
type="xygrid"
id="grid2947" />
</sodipodi:namedview>
<defs
id="defs2348">
<linearGradient
id="linearGradient1556"
x1="12.7662"
y1="2.0027"
x2="12.7662"
y2="10.3611"
gradientUnits="userSpaceOnUse">
<stop
offset="0"
stop-color="#ececec"
id="stop1552"
style="stop-opacity:0;stop-color:#ebebeb" />
<stop
offset="1"
stop-color="#c6c6c5"
id="stop1554" />
</linearGradient>
<linearGradient
id="linearGradient1550"
x1="12.7662"
y1="2.0027"
x2="12.7662"
y2="10.3611"
gradientUnits="userSpaceOnUse">
<stop
offset="0"
stop-color="#ececec"
id="stop1546" />
<stop
offset="1"
stop-color="#c6c6c5"
id="stop1548"
style="stop-opacity:0" />
</linearGradient>
<linearGradient
id="linearGradient2979"
x1="12.7662"
y1="2.0027"
x2="12.7662"
y2="10.3611"
gradientUnits="userSpaceOnUse">
<stop
offset="0"
stop-color="#ececec"
id="stop2975" />
<stop
offset="1"
stop-color="#c6c6c5"
id="stop2977" />
</linearGradient>
<style
id="style2338">.cls-1{fill:url(#Безымянный_градиент_19);}.cls-2{fill:url(#Безымянный_градиент_19-2);}.cls-3{fill:url(#Безымянный_градиент_19-3);}.cls-4{fill:url(#Безымянный_градиент_19-4);}.cls-5{fill:#1a81c4;}.cls-6{fill:#545454;}</style>
<linearGradient
id="Безымянный_градиент_19"
x1="12.7662"
y1="2.0027"
x2="12.7662"
y2="10.3611"
gradientUnits="userSpaceOnUse">
<stop
offset="0"
stop-color="#ececec"
id="stop2340" />
<stop
offset="1"
stop-color="#c6c6c5"
id="stop2342" />
</linearGradient>
<linearGradient
id="Безымянный_градиент_19-2"
x1="12.7525"
y1="23.0164"
x2="12.7525"
y2="14.658"
xlink:href="#Безымянный_градиент_19" />
<linearGradient
id="Безымянный_градиент_19-3"
x1="15.5046"
y1="2.2432"
x2="15.5046"
y2="10.6016"
gradientTransform="translate(25.5094 -2.5136) rotate(90)"
xlink:href="#Безымянный_градиент_19" />
<linearGradient
id="Безымянный_градиент_19-4"
x1="15.4919"
y1="23.5134"
x2="15.4919"
y2="14.8985"
gradientTransform="translate(25.5094 -2.5136) rotate(90)"
xlink:href="#Безымянный_градиент_19" />
</defs>
<title
id="title2350">cursor_shape</title>
<g
id="g1564">
<path
style="fill:none;stroke:#b9b9b9;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 0.52,12.499724 H 25.48"
id="path1558"
sodipodi:nodetypes="cc" />
<path
style="fill:none;stroke:#b9b9b9;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 12.5,25.48 V 0.52000085"
id="path1560"
sodipodi:nodetypes="cc" />
</g>
<path
style="fill:none;stroke:#1a81c4;stroke-width:3;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 8.5,12.5 h 8"
id="path3015" />
<path
style="fill:none;stroke:#1a81c4;stroke-width:3;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 12.5,16.5 v -8"
id="path3017" />
<path
class="cls-6"
d="m 12,12 -9.32e-4,10.882159 2.415252,-2.312217 c 0.325669,0.741356 0.803185,1.836142 1.220872,2.791856 a 1.2338,1.2338 0 0 0 1.627633,0.634824 v 0 a 1.2337,1.2337 0 0 0 0.635719,-1.623937 c -0.417615,-0.955901 -0.895724,-2.05243 -1.222119,-2.796018 l 3.337183,-0.213478 z"
id="path25"
style="fill:#545454" />
</svg>

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 6.5 KiB