Browse Source

More betterer picker icon. Hide dom brush when in picker mode

ssao
A.Olokhtonov 6 months ago
parent
commit
807a1d0c03
  1. 63
      client/icons/picker.svg
  2. 2
      client/webgl_listeners.js

63
client/icons/picker.svg

@ -15,20 +15,20 @@ @@ -15,20 +15,20 @@
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview7"
pagecolor="#ffffff"
pagecolor="#41a7d4"
bordercolor="#666666"
borderopacity="1.0"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="mm"
showgrid="true"
inkscape:zoom="90.509668"
inkscape:cx="7.1926018"
inkscape:cy="12.827359"
inkscape:zoom="32"
inkscape:cx="7.765625"
inkscape:cy="9.0625"
inkscape:window-width="2558"
inkscape:window-height="1396"
inkscape:window-height="1412"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="0"
@ -46,35 +46,60 @@ @@ -46,35 +46,60 @@
inkscape:groupmode="layer"
id="layer1"
transform="translate(-0.0500206,0.06914061)">
<g
id="g2699"
style="stroke:#ffffff;stroke-width:3.64724409;stroke-dasharray:none;stroke-opacity:1"
transform="translate(-0.2273805,0.5521655)">
<path
id="path2684"
style="stroke:#ffffff;stroke-width:3.64724409;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
d="m 17.60468,5.2109617 c -0.867205,0.8672044 -2.273222,0.8672038 -3.140427,-1e-6 -0.867206,-0.8672056 -0.867206,-2.2732231 -2e-6,-3.1404278 0.867205,-0.8672047 2.273222,-0.867204 3.140428,1.7e-6 0.867205,0.8672048 0.867206,2.2732222 10e-7,3.1404271 z"
sodipodi:nodetypes="sssss" />
<path
id="path11870"
style="fill:none;stroke:#ffffff;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
d="m 16.128281,1.3170014 c -0.65397,0 -1.307679,0.2490845 -1.806641,0.7480468 L 11.534531,4.8541108 10.931015,4.2505951 c -0.333675,-0.3336745 -0.871404,-0.3336745 -1.2050785,0 L 9.4251552,4.5513764 c -0.3336746,0.3336746 -0.3336746,0.8714035 0,1.2050781 l 0.023437,0.6796875 -6,6 -1,2 -1,2 2,2 2,-1 2,-1 6.0000003,-6 0.794922,0.138672 c 0.464866,0.08109 0.871403,0.333675 1.205078,0 l 0.300781,-0.300781 c 0.333675,-0.333675 0.333675,-0.8714039 0,-1.2050785 L 15.147812,8.467392 17.934921,5.6783295 c 0.997925,-0.9979247 0.997925,-2.6153565 0,-3.6132813 C 17.435959,1.566086 16.78225,1.3170014 16.128281,1.3170014 Z"
sodipodi:nodetypes="sccssssccccccccssssccss" />
id="path2686"
style="stroke:#ffffff;stroke-width:3.64724409;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
d="m 14.408181,2.2057099 3.062213,3.0622128 -3.09249,3.09249 -3.062213,-3.0622128 z"
sodipodi:nodetypes="ccccc" />
<path
id="path2688"
style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:3.64724409;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
d="M 10.736761,5.9572145 13.718,8.9384545 6.4778464,16.178608 H 4.7742805 l -1.2776741,1.277674 -1.277674,-1.277674 1.2776743,-1.277675 -2e-7,-1.703565 z"
sodipodi:nodetypes="ccccccccc" />
<path
style="fill:#000000;fill-opacity:1;stroke:#ffffff;stroke-width:3.64724409;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
d="m 4.7703397,13.904873 v 1 h 1.0000004 l 3.0000002,-3 -1.0000003,-1 z"
id="path2690"
sodipodi:nodetypes="cccccc" />
<path
id="path2692"
style="stroke:#ffffff;stroke-width:3.64724409;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
d="m 10.71679,4.0190773 4.939346,4.939346 c 0.34205,0.3420501 0.471794,0.7630421 0.290907,0.9439294 l -0.163256,0.1632553 c -0.180887,0.180888 -0.601879,0.05114 -0.94393,-0.2909063 L 9.9005113,4.8353552 C 9.5584616,4.4933056 9.4287171,4.0723131 9.6096043,3.8914257 L 9.7728599,3.7281701 C 9.9537473,3.5472831 10.37474,3.6770276 10.71679,4.0190773 Z"
sodipodi:nodetypes="sssssssss" />
</g>
<path
id="path1222"
style="stroke-width:0;stroke-linecap:round;stroke-linejoin:round;paint-order:stroke fill markers"
d="m 17.934916,5.6788948 c -0.997925,0.9979254 -2.615882,0.9979257 -3.613808,0 -0.997925,-0.9979254 -0.997925,-2.6158828 0,-3.6138082 0.997926,-0.9979257 2.615883,-0.9979254 3.613808,0 0.997926,0.9979257 0.997926,2.6158825 0,3.6138082 z"
style="stroke:#000000;stroke-width:1.48129;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
d="m 17.3773,5.7631272 c -0.867205,0.8672044 -2.273222,0.8672038 -3.140427,-10e-7 -0.867206,-0.8672056 -0.867206,-2.2732231 -2e-6,-3.1404278 0.867205,-0.8672047 2.273222,-0.867204 3.140428,1.7e-6 0.867205,0.8672048 0.867206,2.2732222 1e-6,3.1404271 z"
sodipodi:nodetypes="sssss" />
<path
id="rect1224"
style="stroke-width:0;stroke-linecap:round;stroke-linejoin:round;paint-order:stroke fill markers"
d="m 14.321108,2.0650866 3.613808,3.6138082 -3.011507,3.011507 -3.613808,-3.6138082 z"
style="stroke:#000000;stroke-width:1.5919;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
d="m 14.180801,2.7578754 3.062213,3.0622128 -3.09249,3.09249 -3.062213,-3.0622128 z"
sodipodi:nodetypes="ccccc" />
<path
id="rect3408"
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:1.70357;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;paint-order:stroke fill markers"
d="M 10.966421,6.0523414 13.94766,9.0335811 6.7075065,16.273735 H 5.003941 L 3.7262668,17.551409 2.4485927,16.273735 3.7262668,14.99606 v -1.703565 z"
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:1.70457;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;paint-order:stroke fill markers"
d="M 10.509381,6.50938 13.49062,9.49062 6.2504659,16.730773 H 4.5469 l -1.2776741,1.277674 -1.277674,-1.277674 1.2776743,-1.277675 -2e-7,-1.703565 z"
sodipodi:nodetypes="ccccccccc" />
<path
style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.42656;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
d="m 5,14 0,1 1,0 3,-3 -1,-1 z"
d="m 4.5429592,14.457038 v 1 h 1.0000004 l 3.0000002,-3 -1.0000003,-1 z"
id="path10295"
sodipodi:nodetypes="cccccc" />
<path
id="rect2678"
style="stroke-width:0;stroke-linecap:round;stroke-linejoin:round;paint-order:stroke fill markers"
d="m 10.931333,4.2502561 4.818411,4.818411 c 0.333675,0.3336749 0.333675,0.8709278 0,1.2046029 l -0.301151,0.301151 c -0.333675,0.333675 -0.870928,0.333675 -1.204603,0 L 9.425579,5.7560096 c -0.3336749,-0.3336749 -0.3336749,-0.8709277 0,-1.2046027 L 9.7267297,4.2502562 c 0.3336753,-0.3336749 0.8709283,-0.333675 1.2046033,-1e-7 z"
style="stroke:#000000;stroke-width:1.19462;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
d="m 10.489409,4.5712428 4.939347,4.939346 c 0.34205,0.3420501 0.471794,0.7630422 0.290907,0.9439292 l -0.163256,0.163255 c -0.180887,0.180888 -0.601879,0.05114 -0.94393,-0.290906 L 9.6731308,5.3875207 C 9.3310811,5.0454711 9.2013366,4.6244786 9.3822238,4.4435912 L 9.5454794,4.2803356 c 0.1808874,-0.180887 0.6018796,-0.051142 0.9439296,0.2909072 z"
sodipodi:nodetypes="sssssssss" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

2
client/webgl_listeners.js

@ -109,6 +109,7 @@ function zenmode() { @@ -109,6 +109,7 @@ function zenmode() {
function enter_picker_mode(state, context) {
document.querySelector('canvas').classList.add('picker');
document.querySelector('.picker-preview-outer').classList.remove('dhide');
document.querySelector('.brush-dom').classList.add('dhide');
state.colorpicking = true;
@ -119,6 +120,7 @@ function enter_picker_mode(state, context) { @@ -119,6 +120,7 @@ function enter_picker_mode(state, context) {
function exit_picker_mode(state) {
document.querySelector('canvas').classList.remove('picker');
document.querySelector('.picker-preview-outer').classList.add('dhide');
document.querySelector('.brush-dom').classList.remove('dhide');
state.colorpicking = false;
}

Loading…
Cancel
Save