diff options
| -rw-r--r-- | icons/backward_command.png | bin | 0 -> 3550 bytes | |||
| -rw-r--r-- | icons/backward_command.svg | 121 | ||||
| -rw-r--r-- | icons/backward_stitch.png | bin | 0 -> 3152 bytes | |||
| -rw-r--r-- | icons/backward_stitch.svg | 99 | ||||
| -rw-r--r-- | icons/close.png | bin | 0 -> 3806 bytes | |||
| -rw-r--r-- | icons/close.svg | 202 | ||||
| -rw-r--r-- | icons/color_change.png | bin | 0 -> 4207 bytes | |||
| -rw-r--r-- | icons/color_change.svg | 89 | ||||
| -rw-r--r-- | icons/faster.png | bin | 0 -> 4230 bytes | |||
| -rw-r--r-- | icons/faster.svg | 192 | ||||
| -rw-r--r-- | icons/forward.png | bin | 0 -> 5145 bytes | |||
| -rw-r--r-- | icons/forward.svg | 104 | ||||
| -rw-r--r-- | icons/forward_command.png | bin | 0 -> 3492 bytes | |||
| -rw-r--r-- | icons/forward_command.svg | 121 | ||||
| -rw-r--r-- | icons/forward_stitch.png | bin | 0 -> 3129 bytes | |||
| -rw-r--r-- | icons/forward_stitch.svg | 99 | ||||
| -rw-r--r-- | icons/inkstitch_colour_logo.png | bin | 0 -> 991 bytes | |||
| -rw-r--r-- | icons/jump.png | bin | 0 -> 5343 bytes | |||
| -rw-r--r-- | icons/jump.svg | 1 | ||||
| -rw-r--r-- | icons/npp.png | bin | 0 -> 3375 bytes | |||
| -rw-r--r-- | icons/npp.svg | 253 | ||||
| l--------- | icons/pause.png | 1 | ||||
| -rw-r--r-- | icons/play.png | bin | 0 -> 2646 bytes | |||
| -rw-r--r-- | icons/play.svg | 116 | ||||
| -rw-r--r-- | icons/restart.png | bin | 0 -> 5319 bytes | |||
| -rw-r--r-- | icons/restart.svg | 142 | ||||
| -rw-r--r-- | icons/reverse.png | bin | 0 -> 5047 bytes | |||
| -rw-r--r-- | icons/reverse.svg | 104 | ||||
| -rw-r--r-- | icons/slower.png | bin | 0 -> 4391 bytes | |||
| -rw-r--r-- | icons/slower.svg | 193 | ||||
| -rw-r--r-- | icons/stop.png | bin | 0 -> 2110 bytes | |||
| -rw-r--r-- | icons/stop.svg | 1 | ||||
| -rw-r--r-- | icons/trim.png | bin | 0 -> 5815 bytes | |||
| -rw-r--r-- | icons/trim.svg | 1 | ||||
| -rw-r--r-- | lib/gui/simulator.py | 459 |
35 files changed, 2221 insertions, 77 deletions
diff --git a/icons/backward_command.png b/icons/backward_command.png Binary files differnew file mode 100644 index 00000000..53729a4f --- /dev/null +++ b/icons/backward_command.png diff --git a/icons/backward_command.svg b/icons/backward_command.svg new file mode 100644 index 00000000..daedd4e2 --- /dev/null +++ b/icons/backward_command.svg @@ -0,0 +1,121 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + width="256" + height="256" + viewBox="0 0 256 256" + id="svg8375" + version="1.1" + inkscape:version="1.3 (1:1.3+202307231459+0e150ed6c4)" + sodipodi:docname="backward_command.svg" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + 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/"> + <defs + id="defs8377"> + <inkscape:path-effect + effect="fillet_chamfer" + id="path-effect1" + is_visible="true" + lpeversion="1" + nodesatellites_param="F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1" + radius="5" + unit="px" + method="auto" + mode="F" + chamfer_steps="1" + flexible="false" + use_knot_distance="true" + apply_no_radius="true" + apply_with_radius="true" + only_selected="false" + hide_knots="false" /> + <inkscape:path-effect + effect="fillet_chamfer" + id="path-effect4" + is_visible="true" + lpeversion="1" + nodesatellites_param="F,0,0,1,0,5,0,1 @ F,0,0,1,0,2.8125752,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,2.8437239,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1" + radius="5" + unit="px" + method="auto" + mode="F" + chamfer_steps="1" + flexible="false" + use_knot_distance="true" + apply_no_radius="true" + apply_with_radius="true" + only_selected="false" + hide_knots="false" /> + <inkscape:path-effect + effect="fillet_chamfer" + id="path-effect4-0" + is_visible="true" + lpeversion="1" + nodesatellites_param="F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1" + radius="5" + unit="px" + method="auto" + mode="F" + chamfer_steps="1" + flexible="false" + use_knot_distance="true" + apply_no_radius="true" + apply_with_radius="true" + only_selected="false" + hide_knots="false" /> + </defs> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="2.0715475" + inkscape:cx="78.685139" + inkscape:cy="194.05783" + inkscape:document-units="px" + inkscape:current-layer="layer1" + showgrid="false" + units="mm" + inkscape:window-width="1366" + inkscape:window-height="705" + inkscape:window-x="-4" + inkscape:window-y="-4" + inkscape:window-maximized="1" + inkscape:showpageshadow="2" + inkscape:pagecheckerboard="0" + inkscape:deskcolor="#d1d1d1" /> + <metadata + id="metadata8380"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1"> + <path + style="color:#000000;fill:#000000;-inkscape-stroke:none" + d="m 198.54499,21.388579 -0.29454,48.241365 c -0.0109,1.791042 -0.77803,3.494109 -2.1121,4.689188 l -52.30151,46.852478 c -1.98726,1.78022 -1.98724,4.89216 4e-5,6.67236 l 52.27862,46.83093 c 1.34885,1.2083 2.12444,2.93022 2.13549,4.74109 l 0.29404,48.21105 c 0.0113,1.84862 -2.21625,2.79013 -3.53425,1.49382 L 92.212532,128.0139 c -1.95911,-1.92688 -1.95911,-5.0853 0,-7.01218 L 195.01078,19.89476 c 1.31799,-1.296303 3.5455,-0.354793 3.53421,1.493819 z" + id="path4" + sodipodi:nodetypes="cccccccsccccc" /> + <path + style="color:#000000;fill:#000000;-inkscape-stroke:none" + d="M 77.010782,224.121 V 24.89476 a 5,5 0 0 0 -5,-5 h -9.55585 a 5,5 0 0 0 -5,5 V 224.121 a 5,5 0 0 0 5,5 h 9.55585 a 5,5 0 0 0 5,-5 z" + id="path4-8" + sodipodi:nodetypes="ccccc" /> + </g> +</svg> diff --git a/icons/backward_stitch.png b/icons/backward_stitch.png Binary files differnew file mode 100644 index 00000000..9e97b31f --- /dev/null +++ b/icons/backward_stitch.png diff --git a/icons/backward_stitch.svg b/icons/backward_stitch.svg new file mode 100644 index 00000000..3e64c8d9 --- /dev/null +++ b/icons/backward_stitch.svg @@ -0,0 +1,99 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + width="256" + height="256" + viewBox="0 0 256 256" + id="svg8375" + version="1.1" + inkscape:version="1.3 (1:1.3+202307231459+0e150ed6c4)" + sodipodi:docname="backward_stitch.svg" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + 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/"> + <defs + id="defs8377"> + <inkscape:path-effect + effect="fillet_chamfer" + id="path-effect4" + is_visible="true" + lpeversion="1" + nodesatellites_param="F,0,0,1,0,5,0,1 @ F,0,0,1,0,2.8125752,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,2.8437239,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1" + radius="5" + unit="px" + method="auto" + mode="F" + chamfer_steps="1" + flexible="false" + use_knot_distance="true" + apply_no_radius="true" + apply_with_radius="true" + only_selected="false" + hide_knots="false" /> + <inkscape:path-effect + effect="fillet_chamfer" + id="path-effect4-0" + is_visible="true" + lpeversion="1" + nodesatellites_param="F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1" + radius="5" + unit="px" + method="auto" + mode="F" + chamfer_steps="1" + flexible="false" + use_knot_distance="true" + apply_no_radius="true" + apply_with_radius="true" + only_selected="false" + hide_knots="false" /> + </defs> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="2.6589121" + inkscape:cx="132.38497" + inkscape:cy="84.997169" + inkscape:document-units="px" + inkscape:current-layer="layer1" + showgrid="false" + units="mm" + inkscape:window-width="1366" + inkscape:window-height="705" + inkscape:window-x="-4" + inkscape:window-y="-4" + inkscape:window-maximized="1" + inkscape:showpageshadow="2" + inkscape:pagecheckerboard="0" + inkscape:deskcolor="#d1d1d1" /> + <metadata + id="metadata8380"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1"> + <path + style="color:#000000;fill:#000000;-inkscape-stroke:none" + d="m 181.90086,21.388579 -0.29455,48.241365 c -0.0109,1.791042 -0.77803,3.494109 -2.1121,4.689188 l -52.3015,46.852478 c -1.98726,1.78022 -1.98724,4.89216 4e-5,6.67236 l 52.27861,46.83093 c 1.34885,1.2083 2.12444,2.93022 2.13549,4.74109 l 0.29404,48.21105 c 0.0113,1.84862 -2.21625,2.79013 -3.53424,1.49382 L 75.568397,128.0139 c -1.95911,-1.92688 -1.95911,-5.0853 0,-7.01218 L 178.36665,19.89476 c 1.31798,-1.296303 3.54549,-0.354793 3.53421,1.493819 z" + id="path4" + sodipodi:nodetypes="cccccccsccccc" /> + </g> +</svg> diff --git a/icons/close.png b/icons/close.png Binary files differnew file mode 100644 index 00000000..0212ad0f --- /dev/null +++ b/icons/close.png diff --git a/icons/close.svg b/icons/close.svg new file mode 100644 index 00000000..394a478d --- /dev/null +++ b/icons/close.svg @@ -0,0 +1,202 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + width="256" + height="256" + viewBox="0 0 256 256" + id="svg8375" + version="1.1" + inkscape:version="1.3 (1:1.3+202307231459+0e150ed6c4)" + sodipodi:docname="quit.svg" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + 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/"> + <defs + id="defs8377"> + <inkscape:path-effect + effect="fillet_chamfer" + id="path-effect6" + is_visible="true" + lpeversion="1" + nodesatellites_param="F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1" + radius="5" + unit="px" + method="auto" + mode="F" + chamfer_steps="1" + flexible="false" + use_knot_distance="true" + apply_no_radius="true" + apply_with_radius="true" + only_selected="false" + hide_knots="false" /> + <inkscape:path-effect + effect="fillet_chamfer" + id="path-effect11" + is_visible="true" + lpeversion="1" + nodesatellites_param="F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1" + radius="5" + unit="px" + method="auto" + mode="F" + chamfer_steps="1" + flexible="false" + use_knot_distance="true" + apply_no_radius="true" + apply_with_radius="true" + only_selected="false" + hide_knots="false" /> + <inkscape:path-effect + effect="fillet_chamfer" + id="path-effect8" + is_visible="true" + lpeversion="1" + nodesatellites_param="F,0,0,1,0,4.0553823,0,1 @ F,0,0,1,0,3.332855,0,1 @ F,0,0,1,0,9.7388927,0,1" + radius="0" + unit="px" + method="auto" + mode="F" + chamfer_steps="1" + flexible="false" + use_knot_distance="true" + apply_no_radius="true" + apply_with_radius="true" + only_selected="false" + hide_knots="false" /> + <inkscape:path-effect + effect="fillet_chamfer" + id="path-effect5" + is_visible="true" + lpeversion="1" + nodesatellites_param="F,0,0,1,0,5,0,1 @ F,0,0,1,0,2.8335924,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1" + radius="5" + unit="px" + method="auto" + mode="F" + chamfer_steps="1" + flexible="false" + use_knot_distance="true" + apply_no_radius="true" + apply_with_radius="true" + only_selected="false" + hide_knots="false" /> + <inkscape:path-effect + effect="fillet_chamfer" + id="path-effect1" + is_visible="true" + lpeversion="1" + nodesatellites_param="F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1" + radius="5" + unit="px" + method="auto" + mode="F" + chamfer_steps="1" + flexible="false" + use_knot_distance="true" + apply_no_radius="true" + apply_with_radius="true" + only_selected="false" + hide_knots="false" /> + <inkscape:path-effect + effect="fillet_chamfer" + id="path-effect4" + is_visible="true" + lpeversion="1" + nodesatellites_param="F,0,0,1,0,5,0,1 @ F,0,0,1,0,2.8125752,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,2.8437239,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1" + radius="5" + unit="px" + method="auto" + mode="F" + chamfer_steps="1" + flexible="false" + use_knot_distance="true" + apply_no_radius="true" + apply_with_radius="true" + only_selected="false" + hide_knots="false" /> + <inkscape:path-effect + effect="fillet_chamfer" + id="path-effect4-0" + is_visible="true" + lpeversion="1" + nodesatellites_param="F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1" + radius="5" + unit="px" + method="auto" + mode="F" + chamfer_steps="1" + flexible="false" + use_knot_distance="true" + apply_no_radius="true" + apply_with_radius="true" + only_selected="false" + hide_knots="false" /> + <inkscape:path-effect + effect="fillet_chamfer" + id="path-effect8-9" + is_visible="true" + lpeversion="1" + nodesatellites_param="F,0,0,1,0,4.0553823,0,1 @ F,0,0,1,0,3.332855,0,1 @ F,0,0,1,0,9.7388927,0,1" + radius="0" + unit="px" + method="auto" + mode="F" + chamfer_steps="1" + flexible="false" + use_knot_distance="true" + apply_no_radius="true" + apply_with_radius="true" + only_selected="false" + hide_knots="false" /> + </defs> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="1.8718847" + inkscape:cx="36.327023" + inkscape:cy="185.90888" + inkscape:document-units="px" + inkscape:current-layer="layer1" + showgrid="false" + units="mm" + inkscape:window-width="1366" + inkscape:window-height="705" + inkscape:window-x="-4" + inkscape:window-y="-4" + inkscape:window-maximized="1" + inkscape:showpageshadow="2" + inkscape:pagecheckerboard="0" + inkscape:deskcolor="#d1d1d1" /> + <metadata + id="metadata8380"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1"> + <path + id="path3" + style="color:#000000;fill:#000000;-inkscape-stroke:none" + d="m 60.24352,45.62895 -18.983134,20.3046 a 4.9999202,4.9999202 88.073092 0 0 0.23776,7.067013 l 55.177531,51.584817 a 4.6744399,4.6744399 90 0 1 0,6.82924 l -55.177531,51.58482 a 4.9999205,4.9999205 91.92691 0 0 -0.23776,7.06701 l 18.983134,20.3046 a 5.0000804,5.0000804 1.9269156 0 0 7.067126,0.23777 l 57.036914,-53.32311 a 5.3482365,5.3482365 180 0 1 7.30488,0 l 57.03692,53.32311 a 5.0000805,5.0000805 178.07308 0 0 7.06712,-0.23777 l 18.98314,-20.3046 a 4.9999204,4.9999204 88.073089 0 0 -0.23776,-7.06701 l -55.17754,-51.58482 a 4.6744397,4.6744397 90 0 1 0,-6.82924 l 55.17754,-51.584817 a 4.9999201,4.9999201 91.926909 0 0 0.23776,-7.067013 l -18.98314,-20.3046 a 5.000081,5.000081 1.9269147 0 0 -7.06712,-0.237764 l -57.03692,53.3231 a 5.3482367,5.3482367 6.6635712e-7 0 1 -7.30488,0 L 67.310646,45.391186 A 5.0000809,5.0000809 178.07309 0 0 60.24352,45.62895 Z" + inkscape:path-effect="#path-effect6" + inkscape:original-d="M 63.658203 41.976562 L 37.845703 69.585938 L 100.32812 128 L 37.845703 186.41406 L 63.658203 214.02344 L 128 153.87109 L 192.3418 214.02344 L 218.1543 186.41406 L 155.67188 128 L 218.1543 69.585938 L 192.3418 41.976562 L 128 102.12891 L 63.658203 41.976562 z " /> + </g> +</svg> diff --git a/icons/color_change.png b/icons/color_change.png Binary files differnew file mode 100644 index 00000000..bcdd71b9 --- /dev/null +++ b/icons/color_change.png diff --git a/icons/color_change.svg b/icons/color_change.svg new file mode 100644 index 00000000..a4ccb08b --- /dev/null +++ b/icons/color_change.svg @@ -0,0 +1,89 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + width="256" + height="256" + viewBox="0 0 256 256" + id="svg8375" + version="1.1" + inkscape:version="1.3 (1:1.3+202307231459+0e150ed6c4)" + sodipodi:docname="color_change.svg" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + 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/"> + <defs + id="defs8377" /> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="2.1965384" + inkscape:cx="109.49046" + inkscape:cy="156.15479" + inkscape:document-units="px" + inkscape:current-layer="layer1" + showgrid="false" + units="mm" + inkscape:window-width="1366" + inkscape:window-height="705" + inkscape:window-x="-4" + inkscape:window-y="-4" + inkscape:window-maximized="1" + inkscape:showpageshadow="2" + inkscape:pagecheckerboard="0" + inkscape:deskcolor="#d1d1d1" /> + <metadata + id="metadata8380"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1"> + <path + style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:6.05208;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1" + d="M 44.000812,29.570038 30.791747,6.7852066 H 229.31996 L 216.1109,29.570038 Z" + id="path1-3" + sodipodi:nodetypes="ccccc" /> + <path + style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:6.07943;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1" + d="M 43.221232,227.34049 29.892505,250.12532 H 230.2192 l -13.32872,-22.78483 z" + id="path1-3-6" + sodipodi:nodetypes="ccccc" /> + <path + style="opacity:1;fill:#000000;fill-opacity:0;stroke:#000000;stroke-width:16.6182;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1" + d="M 67.238815,66.882912 H 168.5972 c 73.99266,0 48.44739,117.748648 77.67648,137.710098" + id="path1" + sodipodi:nodetypes="csc" /> + <path + style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:16.6182;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1" + d="M 67.238815,108.10018 H 190.95511" + id="path1-7-5" + sodipodi:nodetypes="cc" /> + <path + style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:16.6182;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1" + d="M 67.238815,149.31747 H 194.5972" + id="path1-7-5-3-5" + sodipodi:nodetypes="cc" /> + <path + style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:16.6182;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1" + d="M 67.238815,190.53475 H 194.5972" + id="path1-7-5-3-5-6-2" + sodipodi:nodetypes="cc" /> + </g> +</svg> diff --git a/icons/faster.png b/icons/faster.png Binary files differnew file mode 100644 index 00000000..d20d2d1c --- /dev/null +++ b/icons/faster.png diff --git a/icons/faster.svg b/icons/faster.svg new file mode 100644 index 00000000..ea48b08e --- /dev/null +++ b/icons/faster.svg @@ -0,0 +1,192 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + width="256" + height="256" + viewBox="0 0 256 256" + id="svg8375" + version="1.1" + inkscape:version="1.3 (1:1.3+202307231459+0e150ed6c4)" + sodipodi:docname="faster.svg" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + 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/"> + <defs + id="defs8377"> + <inkscape:path-effect + effect="fillet_chamfer" + id="path-effect11" + is_visible="true" + lpeversion="1" + nodesatellites_param="F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1" + radius="5" + unit="px" + method="auto" + mode="F" + chamfer_steps="1" + flexible="false" + use_knot_distance="true" + apply_no_radius="true" + apply_with_radius="true" + only_selected="false" + hide_knots="false" /> + <inkscape:path-effect + effect="fillet_chamfer" + id="path-effect8" + is_visible="true" + lpeversion="1" + nodesatellites_param="F,0,0,1,0,4.0553823,0,1 @ F,0,0,1,0,3.332855,0,1 @ F,0,0,1,0,9.7388927,0,1" + radius="0" + unit="px" + method="auto" + mode="F" + chamfer_steps="1" + flexible="false" + use_knot_distance="true" + apply_no_radius="true" + apply_with_radius="true" + only_selected="false" + hide_knots="false" /> + <inkscape:path-effect + effect="fillet_chamfer" + id="path-effect5" + is_visible="true" + lpeversion="1" + nodesatellites_param="F,0,0,1,0,5,0,1 @ F,0,0,1,0,2.8335924,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1" + radius="5" + unit="px" + method="auto" + mode="F" + chamfer_steps="1" + flexible="false" + use_knot_distance="true" + apply_no_radius="true" + apply_with_radius="true" + only_selected="false" + hide_knots="false" /> + <inkscape:path-effect + effect="fillet_chamfer" + id="path-effect1" + is_visible="true" + lpeversion="1" + nodesatellites_param="F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1" + radius="5" + unit="px" + method="auto" + mode="F" + chamfer_steps="1" + flexible="false" + use_knot_distance="true" + apply_no_radius="true" + apply_with_radius="true" + only_selected="false" + hide_knots="false" /> + <inkscape:path-effect + effect="fillet_chamfer" + id="path-effect4" + is_visible="true" + lpeversion="1" + nodesatellites_param="F,0,0,1,0,5,0,1 @ F,0,0,1,0,2.8125752,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,2.8437239,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1" + radius="5" + unit="px" + method="auto" + mode="F" + chamfer_steps="1" + flexible="false" + use_knot_distance="true" + apply_no_radius="true" + apply_with_radius="true" + only_selected="false" + hide_knots="false" /> + <inkscape:path-effect + effect="fillet_chamfer" + id="path-effect4-0" + is_visible="true" + lpeversion="1" + nodesatellites_param="F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1" + radius="5" + unit="px" + method="auto" + mode="F" + chamfer_steps="1" + flexible="false" + use_knot_distance="true" + apply_no_radius="true" + apply_with_radius="true" + only_selected="false" + hide_knots="false" /> + <inkscape:path-effect + effect="fillet_chamfer" + id="path-effect8-9" + is_visible="true" + lpeversion="1" + nodesatellites_param="F,0,0,1,0,4.0553823,0,1 @ F,0,0,1,0,3.332855,0,1 @ F,0,0,1,0,9.7388927,0,1" + radius="0" + unit="px" + method="auto" + mode="F" + chamfer_steps="1" + flexible="false" + use_knot_distance="true" + apply_no_radius="true" + apply_with_radius="true" + only_selected="false" + hide_knots="false" /> + </defs> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="4.2251577" + inkscape:cx="106.85992" + inkscape:cy="109.34503" + inkscape:document-units="px" + inkscape:current-layer="layer1" + showgrid="false" + units="mm" + inkscape:window-width="1366" + inkscape:window-height="705" + inkscape:window-x="-4" + inkscape:window-y="-4" + inkscape:window-maximized="1" + inkscape:showpageshadow="2" + inkscape:pagecheckerboard="0" + inkscape:deskcolor="#d1d1d1" + showguides="false" /> + <metadata + id="metadata8380"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1"> + <g + id="path5"> + <path + id="path1" + style="color:#000000;fill:#000000;fill-rule:evenodd;-inkscape-stroke:none" + d="m 73.380859,105.45508 c 0.0716,-0.0518 0.139187,-0.10853 0.210938,-0.16016 14.159639,-10.126809 31.122973,-16.381141 49.537113,-17.322264 2.52415,-0.129008 7.21412,-0.129007 9.73828,0 25.0746,1.281535 47.36624,12.473984 63.32226,29.679684 l 25.80469,-10.00195 C 201.18046,81.013913 169.41719,63.333782 133.44531,61.712891 c -1.57086,-0.07079 -3.50127,-0.105469 -5.44726,-0.105469 -1.94605,0 -3.8764,0.03468 -5.44727,0.105469 -23.726532,1.069116 -45.660859,9.11378 -63.929686,22.160156 -0.0571,0.04093 -0.110939,0.08592 -0.167969,0.126953 l -0.253906,0.193359 C 29.439252,105.00048 10.260366,138.10382 8.5664062,175.69727 c -0.2822566,6.2639 4.9589648,11.46484 11.0722658,11.46484 h 3.86914 c 6.114577,0 11.018079,-4.97334 11.320313,-10.88672 1.483517,-29.02658 16.149163,-54.44772 38.236328,-70.57812 z m 171.500001,50.83008 -24.25195,13.97265 c 0.24403,1.98685 0.43542,3.98978 0.53906,6.01758 0.30221,5.91339 5.20575,10.88672 11.32031,10.88672 h 3.86914 c 6.11333,0 11.35452,-5.20095 11.07227,-11.46484 -0.29898,-6.63488 -1.18882,-13.11223 -2.54883,-19.41211 z" + sodipodi:nodetypes="ccssccssccccssscccccssssc" /> + </g> + <path + id="path9" + style="stroke-width:1.03573" + d="m 237.44531,122.84961 c -0.97534,-0.0221 -1.96535,0.16307 -2.8789,0.51758 l -108.88477,42.20703 c -4.93891,1.91454 -7.30751,7.72562 -5.125,12.54687 l 6.15234,13.5918 c 1.98581,4.38663 7.47843,6.16499 11.65821,3.77344 a 4.3520101,4.3520101 0 0 0 0.0117,-0.006 l 102.4375,-59.00977 c 2.98284,-1.70683 4.19573,-5.52869 3.39062,-8.30468 -0.80511,-2.77599 -3.34537,-5.2388 -6.76172,-5.31641 z" /> + </g> +</svg> diff --git a/icons/forward.png b/icons/forward.png Binary files differnew file mode 100644 index 00000000..f7a95d11 --- /dev/null +++ b/icons/forward.png diff --git a/icons/forward.svg b/icons/forward.svg new file mode 100644 index 00000000..7e64613d --- /dev/null +++ b/icons/forward.svg @@ -0,0 +1,104 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + width="256" + height="256" + viewBox="0 0 256 256" + id="svg8375" + version="1.1" + inkscape:version="1.3 (1:1.3+202307231459+0e150ed6c4)" + sodipodi:docname="forward.svg" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + 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/"> + <defs + id="defs8377"> + <inkscape:path-effect + effect="fillet_chamfer" + id="path-effect4" + is_visible="true" + lpeversion="1" + nodesatellites_param="F,0,0,1,0,5,0,1 @ F,0,0,1,0,2.8125752,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,2.8437239,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1" + radius="5" + unit="px" + method="auto" + mode="F" + chamfer_steps="1" + flexible="false" + use_knot_distance="true" + apply_no_radius="true" + apply_with_radius="true" + only_selected="false" + hide_knots="false" /> + <inkscape:path-effect + effect="fillet_chamfer" + id="path-effect4-0" + is_visible="true" + lpeversion="1" + nodesatellites_param="F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1" + radius="5" + unit="px" + method="auto" + mode="F" + chamfer_steps="1" + flexible="false" + use_knot_distance="true" + apply_no_radius="true" + apply_with_radius="true" + only_selected="false" + hide_knots="false" /> + </defs> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="2.7316573" + inkscape:cx="62.965439" + inkscape:cy="129.95774" + inkscape:document-units="px" + inkscape:current-layer="layer1" + showgrid="false" + units="mm" + inkscape:window-width="1366" + inkscape:window-height="705" + inkscape:window-x="-4" + inkscape:window-y="-4" + inkscape:window-maximized="1" + inkscape:showpageshadow="2" + inkscape:pagecheckerboard="0" + inkscape:deskcolor="#d1d1d1" /> + <metadata + id="metadata8380"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1"> + <path + style="color:#000000;fill:#000000;-inkscape-stroke:none" + d="m 124.09914,21.388579 0.29454,48.241365 c 0.0109,1.791043 0.77803,3.49411 2.1121,4.689188 l 52.30151,46.852478 c 1.98726,1.78022 1.98724,4.89216 -4e-5,6.67236 l -52.27862,46.83093 c -1.34885,1.2083 -2.12444,2.93022 -2.13549,4.74109 l -0.29404,48.21105 c -0.0113,1.84863 2.21625,2.79014 3.53425,1.49382 L 230.4316,128.0139 c 1.95911,-1.92688 1.95911,-5.0853 0,-7.01218 L 127.63335,19.89476 c -1.31799,-1.296305 -3.5455,-0.354794 -3.53421,1.493819 z" + id="path4" + sodipodi:nodetypes="ccccccccccccc" /> + <path + style="color:#000000;fill:#000000;-inkscape-stroke:none" + d="m 24.099141,21.388579 0.294544,48.241365 c 0.01093,1.791042 0.778028,3.494109 2.112097,4.689188 l 52.301511,46.852478 c 1.987259,1.78022 1.98724,4.89216 -4e-5,6.67236 L 26.528635,174.6749 c -1.348852,1.2083 -2.124443,2.93022 -2.135489,4.74109 l -0.294039,48.21105 c -0.01128,1.84862 2.216247,2.79013 3.534243,1.49382 L 130.4316,128.0139 c 1.95911,-1.92688 1.95911,-5.0853 0,-7.01218 L 27.63335,19.89476 c -1.317988,-1.296303 -3.545496,-0.354793 -3.534209,1.493819 z" + id="path4-1" + sodipodi:nodetypes="cccccccsccccc" /> + </g> +</svg> diff --git a/icons/forward_command.png b/icons/forward_command.png Binary files differnew file mode 100644 index 00000000..ee7e393e --- /dev/null +++ b/icons/forward_command.png diff --git a/icons/forward_command.svg b/icons/forward_command.svg new file mode 100644 index 00000000..b0a79576 --- /dev/null +++ b/icons/forward_command.svg @@ -0,0 +1,121 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + width="256" + height="256" + viewBox="0 0 256 256" + id="svg8375" + version="1.1" + inkscape:version="1.3 (1:1.3+202307231459+0e150ed6c4)" + sodipodi:docname="forward_command.svg" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + 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/"> + <defs + id="defs8377"> + <inkscape:path-effect + effect="fillet_chamfer" + id="path-effect1" + is_visible="true" + lpeversion="1" + nodesatellites_param="F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1" + radius="5" + unit="px" + method="auto" + mode="F" + chamfer_steps="1" + flexible="false" + use_knot_distance="true" + apply_no_radius="true" + apply_with_radius="true" + only_selected="false" + hide_knots="false" /> + <inkscape:path-effect + effect="fillet_chamfer" + id="path-effect4" + is_visible="true" + lpeversion="1" + nodesatellites_param="F,0,0,1,0,5,0,1 @ F,0,0,1,0,2.8125752,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,2.8437239,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1" + radius="5" + unit="px" + method="auto" + mode="F" + chamfer_steps="1" + flexible="false" + use_knot_distance="true" + apply_no_radius="true" + apply_with_radius="true" + only_selected="false" + hide_knots="false" /> + <inkscape:path-effect + effect="fillet_chamfer" + id="path-effect4-0" + is_visible="true" + lpeversion="1" + nodesatellites_param="F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1" + radius="5" + unit="px" + method="auto" + mode="F" + chamfer_steps="1" + flexible="false" + use_knot_distance="true" + apply_no_radius="true" + apply_with_radius="true" + only_selected="false" + hide_knots="false" /> + </defs> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="2.0715475" + inkscape:cx="78.926503" + inkscape:cy="194.05782" + inkscape:document-units="px" + inkscape:current-layer="layer1" + showgrid="false" + units="mm" + inkscape:window-width="1366" + inkscape:window-height="705" + inkscape:window-x="-4" + inkscape:window-y="-4" + inkscape:window-maximized="1" + inkscape:showpageshadow="2" + inkscape:pagecheckerboard="0" + inkscape:deskcolor="#d1d1d1" /> + <metadata + id="metadata8380"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1"> + <path + style="color:#000000;fill:#000000;-inkscape-stroke:none" + d="m 57.455015,21.388579 0.29454,48.241365 c 0.0109,1.791042 0.77803,3.494109 2.1121,4.689188 l 52.301505,46.852478 c 1.98726,1.78022 1.98724,4.89216 -4e-5,6.67236 L 59.884505,174.6749 c -1.34885,1.2083 -2.12444,2.93022 -2.13549,4.74109 l -0.29404,48.21105 c -0.0113,1.84862 2.21625,2.79013 3.53425,1.49382 L 163.78747,128.0139 c 1.95911,-1.92688 1.95911,-5.0853 0,-7.01218 L 60.989225,19.89476 c -1.31799,-1.296303 -3.5455,-0.354793 -3.53421,1.493819 z" + id="path4" + sodipodi:nodetypes="cccccccsccccc" /> + <path + style="color:#000000;fill:#000000;-inkscape-stroke:none" + d="M 178.98922,224.121 V 24.89476 a 5,5 0 0 1 5,-5 h 9.55585 a 5,5 0 0 1 5,5 V 224.121 a 5,5 0 0 1 -5,5 h -9.55585 a 5,5 0 0 1 -5,-5 z" + id="path4-8" + sodipodi:nodetypes="ccccc" /> + </g> +</svg> diff --git a/icons/forward_stitch.png b/icons/forward_stitch.png Binary files differnew file mode 100644 index 00000000..d585dbb9 --- /dev/null +++ b/icons/forward_stitch.png diff --git a/icons/forward_stitch.svg b/icons/forward_stitch.svg new file mode 100644 index 00000000..25a2040a --- /dev/null +++ b/icons/forward_stitch.svg @@ -0,0 +1,99 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + width="256" + height="256" + viewBox="0 0 256 256" + id="svg8375" + version="1.1" + inkscape:version="1.3 (1:1.3+202307231459+0e150ed6c4)" + sodipodi:docname="forward_stitch.svg" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + 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/"> + <defs + id="defs8377"> + <inkscape:path-effect + effect="fillet_chamfer" + id="path-effect4" + is_visible="true" + lpeversion="1" + nodesatellites_param="F,0,0,1,0,5,0,1 @ F,0,0,1,0,2.8125752,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,2.8437239,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1" + radius="5" + unit="px" + method="auto" + mode="F" + chamfer_steps="1" + flexible="false" + use_knot_distance="true" + apply_no_radius="true" + apply_with_radius="true" + only_selected="false" + hide_knots="false" /> + <inkscape:path-effect + effect="fillet_chamfer" + id="path-effect4-0" + is_visible="true" + lpeversion="1" + nodesatellites_param="F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1" + radius="5" + unit="px" + method="auto" + mode="F" + chamfer_steps="1" + flexible="false" + use_knot_distance="true" + apply_no_radius="true" + apply_with_radius="true" + only_selected="false" + hide_knots="false" /> + </defs> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="2.6589121" + inkscape:cx="132.57302" + inkscape:cy="84.997169" + inkscape:document-units="px" + inkscape:current-layer="layer1" + showgrid="false" + units="mm" + inkscape:window-width="1366" + inkscape:window-height="705" + inkscape:window-x="-4" + inkscape:window-y="-4" + inkscape:window-maximized="1" + inkscape:showpageshadow="2" + inkscape:pagecheckerboard="0" + inkscape:deskcolor="#d1d1d1" /> + <metadata + id="metadata8380"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1"> + <path + style="color:#000000;fill:#000000;-inkscape-stroke:none" + d="m 74.099141,21.388579 0.294544,48.241365 c 0.01094,1.791042 0.778028,3.494109 2.112097,4.689188 l 52.301508,46.852478 c 1.98726,1.78022 1.98724,4.89216 -4e-5,6.67236 L 76.528635,174.6749 c -1.348852,1.2083 -2.124443,2.93022 -2.135489,4.74109 l -0.294039,48.21105 c -0.01128,1.84862 2.216247,2.79013 3.534243,1.49382 L 180.4316,128.0139 c 1.95911,-1.92688 1.95911,-5.0853 0,-7.01218 L 77.63335,19.89476 c -1.317988,-1.296303 -3.545496,-0.354793 -3.534209,1.493819 z" + id="path4" + sodipodi:nodetypes="cccccccsccccc" /> + </g> +</svg> diff --git a/icons/inkstitch_colour_logo.png b/icons/inkstitch_colour_logo.png Binary files differnew file mode 100644 index 00000000..9bbdcb0a --- /dev/null +++ b/icons/inkstitch_colour_logo.png diff --git a/icons/jump.png b/icons/jump.png Binary files differnew file mode 100644 index 00000000..40b4b995 --- /dev/null +++ b/icons/jump.png diff --git a/icons/jump.svg b/icons/jump.svg new file mode 100644 index 00000000..b2bb09e0 --- /dev/null +++ b/icons/jump.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 576 512"><!--! Font Awesome Free 6.4.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M368 32c41.7 0 75.9 31.8 79.7 72.5l85.6 26.3c25.4 7.8 42.8 31.3 42.8 57.9c0 21.8-11.7 41.9-30.7 52.7L400.8 323.5 493.3 416H544c17.7 0 32 14.3 32 32s-14.3 32-32 32H480c-8.5 0-16.6-3.4-22.6-9.4L346.9 360.2c11.7-36 3.2-77.1-25.4-105.7c-40.6-40.6-106.3-40.6-146.9-.1L101 324.4c-6.4 6.1-6.7 16.2-.6 22.6s16.2 6.6 22.6 .6l73.8-70.2 .1-.1 .1-.1c3.5-3.5 7.3-6.6 11.3-9.2c27.9-18.5 65.9-15.4 90.5 9.2c24.7 24.7 27.7 62.9 9 90.9c-2.6 3.8-5.6 7.5-9 10.9L261.8 416H352c17.7 0 32 14.3 32 32s-14.3 32-32 32H64c-35.3 0-64-28.7-64-64C0 249.6 127 112.9 289.3 97.5C296.2 60.2 328.8 32 368 32zm0 104a24 24 0 1 0 0-48 24 24 0 1 0 0 48z" style="fill:#000000"/></svg> diff --git a/icons/npp.png b/icons/npp.png Binary files differnew file mode 100644 index 00000000..125f9020 --- /dev/null +++ b/icons/npp.png diff --git a/icons/npp.svg b/icons/npp.svg new file mode 100644 index 00000000..ba0a2281 --- /dev/null +++ b/icons/npp.svg @@ -0,0 +1,253 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + width="256" + height="256" + viewBox="0 0 256 256" + id="svg8375" + version="1.1" + inkscape:version="1.3 (1:1.3+202307231459+0e150ed6c4)" + sodipodi:docname="npp.svg" + xml:space="preserve" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + 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/"><defs + id="defs8377"><inkscape:path-effect + effect="fillet_chamfer" + id="path-effect5" + is_visible="true" + lpeversion="1" + nodesatellites_param="F,0,0,1,0,5,0,1 @ F,0,0,1,0,2.8335924,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1" + radius="5" + unit="px" + method="auto" + mode="F" + chamfer_steps="1" + flexible="false" + use_knot_distance="true" + apply_no_radius="true" + apply_with_radius="true" + only_selected="false" + hide_knots="false" /><inkscape:path-effect + effect="fillet_chamfer" + id="path-effect1" + is_visible="true" + lpeversion="1" + nodesatellites_param="F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1" + radius="5" + unit="px" + method="auto" + mode="F" + chamfer_steps="1" + flexible="false" + use_knot_distance="true" + apply_no_radius="true" + apply_with_radius="true" + only_selected="false" + hide_knots="false" /><inkscape:path-effect + effect="fillet_chamfer" + id="path-effect4" + is_visible="true" + lpeversion="1" + nodesatellites_param="F,0,0,1,0,5,0,1 @ F,0,0,1,0,2.8125752,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,2.8437239,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1" + radius="5" + unit="px" + method="auto" + mode="F" + chamfer_steps="1" + flexible="false" + use_knot_distance="true" + apply_no_radius="true" + apply_with_radius="true" + only_selected="false" + hide_knots="false" /><inkscape:path-effect + effect="fillet_chamfer" + id="path-effect4-0" + is_visible="true" + lpeversion="1" + nodesatellites_param="F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1" + radius="5" + unit="px" + method="auto" + mode="F" + chamfer_steps="1" + flexible="false" + use_knot_distance="true" + apply_no_radius="true" + apply_with_radius="true" + only_selected="false" + hide_knots="false" /><style + type="text/css" + id="style1"> <![CDATA[ + .fil0 {fill:none} + .fil1 {fill:#003399} + ]]> </style> <inkscape:path-effect + effect="fillet_chamfer" + id="path-effect6" + is_visible="true" + lpeversion="1" + nodesatellites_param="F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1" + radius="5" + unit="px" + method="auto" + mode="F" + chamfer_steps="1" + flexible="false" + use_knot_distance="true" + apply_no_radius="true" + apply_with_radius="true" + only_selected="false" + hide_knots="false" /><inkscape:path-effect + effect="fillet_chamfer" + id="path-effect11" + is_visible="true" + lpeversion="1" + nodesatellites_param="F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1" + radius="5" + unit="px" + method="auto" + mode="F" + chamfer_steps="1" + flexible="false" + use_knot_distance="true" + apply_no_radius="true" + apply_with_radius="true" + only_selected="false" + hide_knots="false" /><inkscape:path-effect + effect="fillet_chamfer" + id="path-effect8" + is_visible="true" + lpeversion="1" + nodesatellites_param="F,0,0,1,0,4.0553823,0,1 @ F,0,0,1,0,3.332855,0,1 @ F,0,0,1,0,9.7388927,0,1" + radius="0" + unit="px" + method="auto" + mode="F" + chamfer_steps="1" + flexible="false" + use_knot_distance="true" + apply_no_radius="true" + apply_with_radius="true" + only_selected="false" + hide_knots="false" /><inkscape:path-effect + effect="fillet_chamfer" + id="path-effect5-2" + is_visible="true" + lpeversion="1" + nodesatellites_param="F,0,0,1,0,5,0,1 @ F,0,0,1,0,2.8335924,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1" + radius="5" + unit="px" + method="auto" + mode="F" + chamfer_steps="1" + flexible="false" + use_knot_distance="true" + apply_no_radius="true" + apply_with_radius="true" + only_selected="false" + hide_knots="false" /><inkscape:path-effect + effect="fillet_chamfer" + id="path-effect1-9" + is_visible="true" + lpeversion="1" + nodesatellites_param="F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1" + radius="5" + unit="px" + method="auto" + mode="F" + chamfer_steps="1" + flexible="false" + use_knot_distance="true" + apply_no_radius="true" + apply_with_radius="true" + only_selected="false" + hide_knots="false" /><inkscape:path-effect + effect="fillet_chamfer" + id="path-effect4-3" + is_visible="true" + lpeversion="1" + nodesatellites_param="F,0,0,1,0,5,0,1 @ F,0,0,1,0,2.8125752,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,2.8437239,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1" + radius="5" + unit="px" + method="auto" + mode="F" + chamfer_steps="1" + flexible="false" + use_knot_distance="true" + apply_no_radius="true" + apply_with_radius="true" + only_selected="false" + hide_knots="false" /><inkscape:path-effect + effect="fillet_chamfer" + id="path-effect4-0-1" + is_visible="true" + lpeversion="1" + nodesatellites_param="F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1" + radius="5" + unit="px" + method="auto" + mode="F" + chamfer_steps="1" + flexible="false" + use_knot_distance="true" + apply_no_radius="true" + apply_with_radius="true" + only_selected="false" + hide_knots="false" /><inkscape:path-effect + effect="fillet_chamfer" + id="path-effect8-9" + is_visible="true" + lpeversion="1" + nodesatellites_param="F,0,0,1,0,4.0553823,0,1 @ F,0,0,1,0,3.332855,0,1 @ F,0,0,1,0,9.7388927,0,1" + radius="0" + unit="px" + method="auto" + mode="F" + chamfer_steps="1" + flexible="false" + use_knot_distance="true" + apply_no_radius="true" + apply_with_radius="true" + only_selected="false" + hide_knots="false" /></defs><sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="1.3991985" + inkscape:cx="-21.440847" + inkscape:cy="120.06874" + inkscape:document-units="px" + inkscape:current-layer="layer1" + showgrid="false" + units="mm" + inkscape:window-width="1366" + inkscape:window-height="705" + inkscape:window-x="-4" + inkscape:window-y="-4" + inkscape:window-maximized="1" + inkscape:showpageshadow="2" + inkscape:pagecheckerboard="0" + inkscape:deskcolor="#d1d1d1" /><metadata + id="metadata8380"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1"><path + id="path3" + style="color:#000000;fill:#000000;-inkscape-stroke:none" + d="M 40.018189,26.719926 21.035055,47.024525 c -1.885869,2.017149 -1.779412,5.181168 0.237759,7.067013 l 75.402863,70.493842 c 1.97619,1.84753 1.976189,4.98171 0,6.82924 l -78.050824,72.96946 c -2.01717,1.88585 -2.123628,5.04987 -0.23776,7.06702 l 18.983135,20.3046 c 1.885886,2.01717 5.049936,2.12363 7.067126,0.23776 l 79.910206,-74.70775 c 2.05572,-1.92189 5.24915,-1.92188 7.30488,0 l 80.24158,75.01686 c 2.0172,1.88586 5.18124,1.77941 7.06712,-0.23776 l 18.98314,-20.3046 c 1.88587,-2.01715 1.77942,-5.18118 -0.23776,-7.06702 l -78.3822,-73.27857 c -1.97619,-1.84752 -1.97619,-4.98171 0,-6.82924 L 239.1012,50.002195 c 2.01717,-1.885847 2.12363,-5.049865 0.23776,-7.067013 l -18.98313,-20.3046 c -1.88589,-2.017168 -5.04994,-2.123628 -7.06713,-0.237764 l -81.63626,76.321468 c -2.05572,1.921894 -5.24916,1.921894 -7.30488,0 L 47.085315,26.482162 c -2.01719,-1.885863 -5.18124,-1.779404 -7.067126,0.237764 z" + transform="matrix(0.25609436,0,0,0.25609436,95.219922,194.32522)" + sodipodi:nodetypes="sssssssssssssssssssssssss" /><path + id="path19" + style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:12.036" + d="M 124.40025,149.19227 100.43237,72.962723 99.271803,-36.396321 h 57.426717 l -1.13089,109.359044 -19.96788,76.229547 -5.59963,19.80302 z" + sodipodi:nodetypes="cccccccc" /></g></svg> diff --git a/icons/pause.png b/icons/pause.png new file mode 120000 index 00000000..6222e6f7 --- /dev/null +++ b/icons/pause.png @@ -0,0 +1 @@ +stop.png
\ No newline at end of file diff --git a/icons/play.png b/icons/play.png Binary files differnew file mode 100644 index 00000000..209c4e7e --- /dev/null +++ b/icons/play.png diff --git a/icons/play.svg b/icons/play.svg new file mode 100644 index 00000000..4ae8c42d --- /dev/null +++ b/icons/play.svg @@ -0,0 +1,116 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + width="256" + height="256" + viewBox="0 0 256 256" + id="svg8375" + version="1.1" + inkscape:version="1.3 (1:1.3+202307231459+0e150ed6c4)" + sodipodi:docname="play.svg" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + 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/"> + <defs + id="defs8377"> + <inkscape:path-effect + effect="fillet_chamfer" + id="path-effect1" + is_visible="true" + lpeversion="1" + nodesatellites_param="F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1" + radius="5" + unit="px" + method="auto" + mode="F" + chamfer_steps="1" + flexible="false" + use_knot_distance="true" + apply_no_radius="true" + apply_with_radius="true" + only_selected="false" + hide_knots="false" /> + <inkscape:path-effect + effect="fillet_chamfer" + id="path-effect4" + is_visible="true" + lpeversion="1" + nodesatellites_param="F,0,0,1,0,5,0,1 @ F,0,0,1,0,2.8125752,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,2.8437239,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1" + radius="5" + unit="px" + method="auto" + mode="F" + chamfer_steps="1" + flexible="false" + use_knot_distance="true" + apply_no_radius="true" + apply_with_radius="true" + only_selected="false" + hide_knots="false" /> + <inkscape:path-effect + effect="fillet_chamfer" + id="path-effect4-0" + is_visible="true" + lpeversion="1" + nodesatellites_param="F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1" + radius="5" + unit="px" + method="auto" + mode="F" + chamfer_steps="1" + flexible="false" + use_knot_distance="true" + apply_no_radius="true" + apply_with_radius="true" + only_selected="false" + hide_knots="false" /> + </defs> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="2.0715475" + inkscape:cx="79.409234" + inkscape:cy="194.05782" + inkscape:document-units="px" + inkscape:current-layer="layer1" + showgrid="false" + units="mm" + inkscape:window-width="1366" + inkscape:window-height="705" + inkscape:window-x="-4" + inkscape:window-y="-4" + inkscape:window-maximized="1" + inkscape:showpageshadow="2" + inkscape:pagecheckerboard="0" + inkscape:deskcolor="#d1d1d1" /> + <metadata + id="metadata8380"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1"> + <path + style="color:#000000;fill:#000000;-inkscape-stroke:none" + d="m 62.099123,21.388579 -3.4e-5,206.238461 c 0,1.84865 2.216247,2.79013 3.534243,1.49382 L 192.43159,128.0139 c 1.95911,-1.92688 1.95911,-5.0853 0,-7.01218 L 65.633332,19.89476 c -1.317988,-1.296303 -3.545496,-0.354793 -3.534209,1.493819 z" + id="path4" + sodipodi:nodetypes="csccccc" /> + </g> +</svg> diff --git a/icons/restart.png b/icons/restart.png Binary files differnew file mode 100644 index 00000000..f146bb14 --- /dev/null +++ b/icons/restart.png diff --git a/icons/restart.svg b/icons/restart.svg new file mode 100644 index 00000000..4fe1e327 --- /dev/null +++ b/icons/restart.svg @@ -0,0 +1,142 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + width="256" + height="256" + viewBox="0 0 256 256" + id="svg8375" + version="1.1" + inkscape:version="1.3 (1:1.3+202307231459+0e150ed6c4)" + sodipodi:docname="restart.svg" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + 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/"> + <defs + id="defs8377"> + <inkscape:path-effect + effect="fillet_chamfer" + id="path-effect5" + is_visible="true" + lpeversion="1" + nodesatellites_param="F,0,0,1,0,5,0,1 @ F,0,0,1,0,2.8335924,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1" + radius="5" + unit="px" + method="auto" + mode="F" + chamfer_steps="1" + flexible="false" + use_knot_distance="true" + apply_no_radius="true" + apply_with_radius="true" + only_selected="false" + hide_knots="false" /> + <inkscape:path-effect + effect="fillet_chamfer" + id="path-effect1" + is_visible="true" + lpeversion="1" + nodesatellites_param="F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1" + radius="5" + unit="px" + method="auto" + mode="F" + chamfer_steps="1" + flexible="false" + use_knot_distance="true" + apply_no_radius="true" + apply_with_radius="true" + only_selected="false" + hide_knots="false" /> + <inkscape:path-effect + effect="fillet_chamfer" + id="path-effect4" + is_visible="true" + lpeversion="1" + nodesatellites_param="F,0,0,1,0,5,0,1 @ F,0,0,1,0,2.8125752,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,2.8437239,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1" + radius="5" + unit="px" + method="auto" + mode="F" + chamfer_steps="1" + flexible="false" + use_knot_distance="true" + apply_no_radius="true" + apply_with_radius="true" + only_selected="false" + hide_knots="false" /> + <inkscape:path-effect + effect="fillet_chamfer" + id="path-effect4-0" + is_visible="true" + lpeversion="1" + nodesatellites_param="F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1" + radius="5" + unit="px" + method="auto" + mode="F" + chamfer_steps="1" + flexible="false" + use_knot_distance="true" + apply_no_radius="true" + apply_with_radius="true" + only_selected="false" + hide_knots="false" /> + </defs> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="3.8646819" + inkscape:cx="107.51208" + inkscape:cy="101.17262" + inkscape:document-units="px" + inkscape:current-layer="layer1" + showgrid="false" + units="mm" + inkscape:window-width="1366" + inkscape:window-height="705" + inkscape:window-x="-4" + inkscape:window-y="-4" + inkscape:window-maximized="1" + inkscape:showpageshadow="2" + inkscape:pagecheckerboard="0" + inkscape:deskcolor="#d1d1d1" /> + <metadata + id="metadata8380"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1"> + <g + id="path1"> + <path + id="path5" + style="color:#000000;fill:#000000;fill-rule:evenodd;-inkscape-stroke:none" + d="M 195.24506,2.3679933 175.50387,25.031 c -1.0279,1.180039 -3.23341,1.388927 -4.67132,0.771382 -13.64725,-5.861155 -28.10587,-8.87888 -42.5422,-9.062919 -2.76097,-0.0352 -7.23841,0.111017 -9.99139,0.32387 -23.727529,1.834547 -46.819958,11.211646 -65.412237,27.6935 -2.066198,1.831662 -5.282196,4.950313 -7.176488,6.959255 C 13.538723,85.834762 6.1712264,136.75422 27.351611,178.59302 c 1.247121,2.46351 3.447164,6.36588 4.909386,8.70812 24.833468,39.77918 72.212663,59.83209 118.057693,49.96714 2.69941,-0.58086 7.03245,-1.71814 9.66917,-2.53784 44.78048,-13.92126 76.20583,-54.65801 78.30276,-101.50555 0.12346,-2.75843 -2.12686,-4.99833 -4.88828,-4.99833 h -27.79687 c -2.76142,0 -4.98237,2.24154 -5.16662,4.99629 -1.9945,29.82032 -21.72561,55.39877 -50.06261,64.89837 -2.61773,0.87755 -6.95393,2.01566 -9.66521,2.53679 -29.34952,5.64116 -59.097342,-6.951 -75.479399,-31.94811 -1.513349,-2.30919 -3.714997,-6.2144 -4.907365,-8.70456 -12.907393,-26.95599 -8.281007,-58.92702 11.738156,-81.118457 1.84934,-2.050012 5.320444,-4.909791 7.173646,-6.956315 11.662883,-12.879532 41.653402,-32.143222 70.130182,-13.703498 2.31746,1.500634 3.06751,2.171615 1.25077,4.251252 l -20.51828,23.48743 c -1.83341,2.098721 -1.30415,5.36805 1.30443,6.268252 l 75.15001,0.699671 c 2.14635,0.719785 4.16473,-1.091262 3.90872,-3.340563 L 200.75459,4.3041237 c -0.43744,-2.6680534 -3.75803,-3.94686842 -5.50953,-1.9361304 z" + transform="translate(0.7256225)" + sodipodi:nodetypes="sssssssssssssssscsssssssccscs" /> + <g + id="g2"> + <g + id="path2" /> + </g> + </g> + </g> +</svg> diff --git a/icons/reverse.png b/icons/reverse.png Binary files differnew file mode 100644 index 00000000..982bf3e5 --- /dev/null +++ b/icons/reverse.png diff --git a/icons/reverse.svg b/icons/reverse.svg new file mode 100644 index 00000000..29e3d738 --- /dev/null +++ b/icons/reverse.svg @@ -0,0 +1,104 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + width="256" + height="256" + viewBox="0 0 256 256" + id="svg8375" + version="1.1" + inkscape:version="1.3 (1:1.3+202307231459+0e150ed6c4)" + sodipodi:docname="reverse.svg" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + 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/"> + <defs + id="defs8377"> + <inkscape:path-effect + effect="fillet_chamfer" + id="path-effect4" + is_visible="true" + lpeversion="1" + nodesatellites_param="F,0,0,1,0,5,0,1 @ F,0,0,1,0,2.8125752,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,2.8437239,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1" + radius="5" + unit="px" + method="auto" + mode="F" + chamfer_steps="1" + flexible="false" + use_knot_distance="true" + apply_no_radius="true" + apply_with_radius="true" + only_selected="false" + hide_knots="false" /> + <inkscape:path-effect + effect="fillet_chamfer" + id="path-effect4-0" + is_visible="true" + lpeversion="1" + nodesatellites_param="F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1" + radius="5" + unit="px" + method="auto" + mode="F" + chamfer_steps="1" + flexible="false" + use_knot_distance="true" + apply_no_radius="true" + apply_with_radius="true" + only_selected="false" + hide_knots="false" /> + </defs> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="2.7316573" + inkscape:cx="62.965439" + inkscape:cy="129.95774" + inkscape:document-units="px" + inkscape:current-layer="layer1" + showgrid="false" + units="mm" + inkscape:window-width="1366" + inkscape:window-height="705" + inkscape:window-x="-4" + inkscape:window-y="-4" + inkscape:window-maximized="1" + inkscape:showpageshadow="2" + inkscape:pagecheckerboard="0" + inkscape:deskcolor="#d1d1d1" /> + <metadata + id="metadata8380"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1"> + <path + style="color:#000000;fill:#000000;-inkscape-stroke:none" + d="m 131.90086,21.388579 -0.29454,48.241365 c -0.0109,1.791043 -0.77803,3.49411 -2.1121,4.689188 L 77.192707,121.17161 c -1.98726,1.78022 -1.98724,4.89216 4e-5,6.67236 l 52.278623,46.83093 c 1.34885,1.2083 2.12444,2.93022 2.13549,4.74109 l 0.29404,48.21105 c 0.0113,1.84863 -2.21625,2.79014 -3.53425,1.49382 L 25.568397,128.0139 c -1.95911,-1.92688 -1.95911,-5.0853 0,-7.01218 L 128.36665,19.89476 c 1.31799,-1.296305 3.5455,-0.354794 3.53421,1.493819 z" + id="path4" + sodipodi:nodetypes="ccccccccccccc" /> + <path + style="color:#000000;fill:#000000;-inkscape-stroke:none" + d="m 231.90086,21.388579 -0.29455,48.241365 c -0.0109,1.791042 -0.77803,3.494109 -2.1121,4.689188 L 177.1927,121.17161 c -1.98726,1.78022 -1.98724,4.89216 4e-5,6.67236 l 52.27862,46.83093 c 1.34885,1.2083 2.12444,2.93022 2.13549,4.74109 l 0.29404,48.21105 c 0.0113,1.84862 -2.21625,2.79013 -3.53424,1.49382 L 125.5684,128.0139 c -1.95911,-1.92688 -1.95911,-5.0853 0,-7.01218 L 228.36665,19.89476 c 1.31798,-1.296303 3.54549,-0.354793 3.53421,1.493819 z" + id="path4-1" + sodipodi:nodetypes="cccccccsccccc" /> + </g> +</svg> diff --git a/icons/slower.png b/icons/slower.png Binary files differnew file mode 100644 index 00000000..fce47d54 --- /dev/null +++ b/icons/slower.png diff --git a/icons/slower.svg b/icons/slower.svg new file mode 100644 index 00000000..02464415 --- /dev/null +++ b/icons/slower.svg @@ -0,0 +1,193 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + width="256" + height="256" + viewBox="0 0 256 256" + id="svg8375" + version="1.1" + inkscape:version="1.3 (1:1.3+202307231459+0e150ed6c4)" + sodipodi:docname="slower.svg" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + 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/"> + <defs + id="defs8377"> + <inkscape:path-effect + effect="fillet_chamfer" + id="path-effect11" + is_visible="true" + lpeversion="1" + nodesatellites_param="F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1" + radius="5" + unit="px" + method="auto" + mode="F" + chamfer_steps="1" + flexible="false" + use_knot_distance="true" + apply_no_radius="true" + apply_with_radius="true" + only_selected="false" + hide_knots="false" /> + <inkscape:path-effect + effect="fillet_chamfer" + id="path-effect8" + is_visible="true" + lpeversion="1" + nodesatellites_param="F,0,0,1,0,4.0553823,0,1 @ F,0,0,1,0,3.332855,0,1 @ F,0,0,1,0,9.7388927,0,1" + radius="0" + unit="px" + method="auto" + mode="F" + chamfer_steps="1" + flexible="false" + use_knot_distance="true" + apply_no_radius="true" + apply_with_radius="true" + only_selected="false" + hide_knots="false" /> + <inkscape:path-effect + effect="fillet_chamfer" + id="path-effect5" + is_visible="true" + lpeversion="1" + nodesatellites_param="F,0,0,1,0,5,0,1 @ F,0,0,1,0,2.8335924,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1" + radius="5" + unit="px" + method="auto" + mode="F" + chamfer_steps="1" + flexible="false" + use_knot_distance="true" + apply_no_radius="true" + apply_with_radius="true" + only_selected="false" + hide_knots="false" /> + <inkscape:path-effect + effect="fillet_chamfer" + id="path-effect1" + is_visible="true" + lpeversion="1" + nodesatellites_param="F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1" + radius="5" + unit="px" + method="auto" + mode="F" + chamfer_steps="1" + flexible="false" + use_knot_distance="true" + apply_no_radius="true" + apply_with_radius="true" + only_selected="false" + hide_knots="false" /> + <inkscape:path-effect + effect="fillet_chamfer" + id="path-effect4" + is_visible="true" + lpeversion="1" + nodesatellites_param="F,0,0,1,0,5,0,1 @ F,0,0,1,0,2.8125752,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,2.8437239,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1" + radius="5" + unit="px" + method="auto" + mode="F" + chamfer_steps="1" + flexible="false" + use_knot_distance="true" + apply_no_radius="true" + apply_with_radius="true" + only_selected="false" + hide_knots="false" /> + <inkscape:path-effect + effect="fillet_chamfer" + id="path-effect4-0" + is_visible="true" + lpeversion="1" + nodesatellites_param="F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1 @ F,0,0,1,0,5,0,1" + radius="5" + unit="px" + method="auto" + mode="F" + chamfer_steps="1" + flexible="false" + use_knot_distance="true" + apply_no_radius="true" + apply_with_radius="true" + only_selected="false" + hide_knots="false" /> + <inkscape:path-effect + effect="fillet_chamfer" + id="path-effect8-9" + is_visible="true" + lpeversion="1" + nodesatellites_param="F,0,0,1,0,4.0553823,0,1 @ F,0,0,1,0,3.332855,0,1 @ F,0,0,1,0,9.7388927,0,1" + radius="0" + unit="px" + method="auto" + mode="F" + chamfer_steps="1" + flexible="false" + use_knot_distance="true" + apply_no_radius="true" + apply_with_radius="true" + only_selected="false" + hide_knots="false" /> + </defs> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="4.2251577" + inkscape:cx="106.85992" + inkscape:cy="109.34503" + inkscape:document-units="px" + inkscape:current-layer="layer1" + showgrid="false" + units="mm" + inkscape:window-width="1366" + inkscape:window-height="705" + inkscape:window-x="-4" + inkscape:window-y="-4" + inkscape:window-maximized="1" + inkscape:showpageshadow="2" + inkscape:pagecheckerboard="0" + inkscape:deskcolor="#d1d1d1" + showguides="false" /> + <metadata + id="metadata8380"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1"> + <g + id="path5" + transform="matrix(-1,0,0,1,255.9961,0)"> + <path + id="path1" + style="color:#000000;fill:#000000;fill-rule:evenodd;-inkscape-stroke:none" + d="m 73.380859,105.45508 c 0.0716,-0.0518 0.139187,-0.10853 0.210938,-0.16016 14.159639,-10.126809 31.122973,-16.381141 49.537113,-17.322264 2.52415,-0.129008 7.21412,-0.129007 9.73828,0 25.0746,1.281535 47.36624,12.473984 63.32226,29.679684 l 25.80469,-10.00195 C 201.18046,81.013913 169.41719,63.333782 133.44531,61.712891 c -1.57086,-0.07079 -3.50127,-0.105469 -5.44726,-0.105469 -1.94605,0 -3.8764,0.03468 -5.44727,0.105469 -23.726532,1.069116 -45.660859,9.11378 -63.929686,22.160156 -0.0571,0.04093 -0.110939,0.08592 -0.167969,0.126953 l -0.253906,0.193359 C 29.439252,105.00048 10.260366,138.10382 8.5664062,175.69727 c -0.2822566,6.2639 4.9589648,11.46484 11.0722658,11.46484 h 3.86914 c 6.114577,0 11.018079,-4.97334 11.320313,-10.88672 1.483517,-29.02658 16.149163,-54.44772 38.236328,-70.57812 z m 171.500001,50.83008 -24.25195,13.97265 c 0.24403,1.98685 0.43542,3.98978 0.53906,6.01758 0.30221,5.91339 5.20575,10.88672 11.32031,10.88672 h 3.86914 c 6.11333,0 11.35452,-5.20095 11.07227,-11.46484 -0.29898,-6.63488 -1.18882,-13.11223 -2.54883,-19.41211 z" + sodipodi:nodetypes="ccssccssccccssscccccssssc" /> + </g> + <path + id="path9" + style="stroke-width:1.03573" + d="m 18.550786,122.84961 c 0.97534,-0.0221 1.96535,0.16307 2.8789,0.51758 l 108.884774,42.20703 c 4.93891,1.91454 7.30751,7.72562 5.125,12.54687 l -6.15234,13.5918 c -1.98581,4.38663 -7.47843,6.16499 -11.65821,3.77344 a 4.3520101,4.3520101 0 0 1 -0.0117,-0.006 L 15.179706,136.47056 c -2.98284,-1.70683 -4.19573,-5.52869 -3.39062,-8.30468 0.80511,-2.77599 3.34537,-5.2388 6.76172,-5.31641 z" /> + </g> +</svg> diff --git a/icons/stop.png b/icons/stop.png Binary files differnew file mode 100644 index 00000000..7245124b --- /dev/null +++ b/icons/stop.png diff --git a/icons/stop.svg b/icons/stop.svg new file mode 100644 index 00000000..b4feeb4c --- /dev/null +++ b/icons/stop.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 320 512"><!--! Font Awesome Free 6.4.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M48 64C21.5 64 0 85.5 0 112V400c0 26.5 21.5 48 48 48H80c26.5 0 48-21.5 48-48V112c0-26.5-21.5-48-48-48H48zm192 0c-26.5 0-48 21.5-48 48V400c0 26.5 21.5 48 48 48h32c26.5 0 48-21.5 48-48V112c0-26.5-21.5-48-48-48H240z"/></svg> diff --git a/icons/trim.png b/icons/trim.png Binary files differnew file mode 100644 index 00000000..8310813a --- /dev/null +++ b/icons/trim.png diff --git a/icons/trim.svg b/icons/trim.svg new file mode 100644 index 00000000..3d58f3dd --- /dev/null +++ b/icons/trim.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 512 512"><!--! Font Awesome Free 6.4.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M256 192l-39.5-39.5c4.9-12.6 7.5-26.2 7.5-40.5C224 50.1 173.9 0 112 0S0 50.1 0 112s50.1 112 112 112c14.3 0 27.9-2.7 40.5-7.5L192 256l-39.5 39.5c-12.6-4.9-26.2-7.5-40.5-7.5C50.1 288 0 338.1 0 400s50.1 112 112 112s112-50.1 112-112c0-14.3-2.7-27.9-7.5-40.5L499.2 76.8c7.1-7.1 7.1-18.5 0-25.6c-28.3-28.3-74.1-28.3-102.4 0L256 192zm22.6 150.6L396.8 460.8c28.3 28.3 74.1 28.3 102.4 0c7.1-7.1 7.1-18.5 0-25.6L342.6 278.6l-64 64zM64 112a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zm48 240a48 48 0 1 1 0 96 48 48 0 1 1 0-96z"/></svg> diff --git a/lib/gui/simulator.py b/lib/gui/simulator.py index 78138fc8..963acd45 100644 --- a/lib/gui/simulator.py +++ b/lib/gui/simulator.py @@ -2,7 +2,7 @@ # # Copyright (c) 2010 Authors # Licensed under the GNU GPL version 3.0 or later. See the file LICENSE for details. - +import os import sys import time from threading import Event, Thread @@ -11,6 +11,7 @@ import wx from wx.lib.intctrl import IntCtrl from lib.debug import debug +from lib.utils import get_resource_dir from lib.utils.threading import ExitThread from ..i18n import _ from ..stitch_plan import stitch_groups_to_stitch_plan, stitch_plan_from_file @@ -29,6 +30,7 @@ COLOR_CHANGE = 4 class ControlPanel(wx.Panel): """""" + @debug.time def __init__(self, parent, *args, **kwargs): """""" self.parent = parent @@ -38,44 +40,68 @@ class ControlPanel(wx.Panel): kwargs['style'] = wx.BORDER_SUNKEN wx.Panel.__init__(self, parent, *args, **kwargs) - self.statusbar = self.GetTopLevelParent().statusbar - self.drawing_panel = None self.num_stitches = 1 self.current_stitch = 1 self.speed = 1 self.direction = 1 + self._last_color_block_end = 0 + + self.icons_dir = get_resource_dir("icons") # Widgets - self.btnMinus = wx.Button(self, -1, label='-') + self.button_size = self.GetTextExtent("M").y * 2 + self.button_style = wx.BU_EXACTFIT | wx.BU_NOTEXT + self.btnMinus = wx.Button(self, -1, style=self.button_style) self.btnMinus.Bind(wx.EVT_BUTTON, self.animation_slow_down) + self.btnMinus.SetBitmap(self.load_icon('slower')) self.btnMinus.SetToolTip(_('Slow down (arrow down)')) - self.btnPlus = wx.Button(self, -1, label='+') + self.btnPlus = wx.Button(self, -1, style=self.button_style) self.btnPlus.Bind(wx.EVT_BUTTON, self.animation_speed_up) + self.btnPlus.SetBitmap(self.load_icon('faster')) self.btnPlus.SetToolTip(_('Speed up (arrow up)')) - self.btnBackwardStitch = wx.Button(self, -1, label='<|') + self.btnBackwardStitch = wx.Button(self, -1, style=self.button_style) self.btnBackwardStitch.Bind(wx.EVT_BUTTON, self.animation_one_stitch_backward) - self.btnBackwardStitch.SetToolTip(_('Go on step backward (-)')) - self.btnForwardStitch = wx.Button(self, -1, label='|>') + self.btnBackwardStitch.SetBitmap(self.load_icon('backward_stitch')) + self.btnBackwardStitch.SetToolTip(_('Go backward one stitch (-)')) + self.btnForwardStitch = wx.Button(self, -1, style=self.button_style) self.btnForwardStitch.Bind(wx.EVT_BUTTON, self.animation_one_stitch_forward) - self.btnForwardStitch.SetToolTip(_('Go on step forward (+)')) - self.directionBtn = wx.Button(self, -1, label='<<') - self.directionBtn.Bind(wx.EVT_BUTTON, self.on_direction_button) - self.directionBtn.SetToolTip(_('Switch direction (arrow left | arrow right)')) - self.pauseBtn = wx.Button(self, -1, label=_('Pause')) - self.pauseBtn.Bind(wx.EVT_BUTTON, self.on_pause_start_button) - self.pauseBtn.SetToolTip(_('Pause (P)')) - self.restartBtn = wx.Button(self, -1, label=_('Restart')) - self.restartBtn.Bind(wx.EVT_BUTTON, self.animation_restart) - self.restartBtn.SetToolTip(_('Restart (R)')) - self.nppBtn = wx.ToggleButton(self, -1, label=_('O')) - self.nppBtn.Bind(wx.EVT_TOGGLEBUTTON, self.toggle_npp) - self.nppBtn.SetToolTip(_('Display needle penetration point (O)')) - self.quitBtn = wx.Button(self, -1, label=_('Quit')) - self.quitBtn.Bind(wx.EVT_BUTTON, self.animation_quit) - self.quitBtn.SetToolTip(_('Quit (Q)')) - self.slider = wx.Slider(self, -1, value=1, minValue=1, maxValue=2, - style=wx.SL_HORIZONTAL | wx.SL_LABELS) + self.btnForwardStitch.SetBitmap(self.load_icon('forward_stitch')) + self.btnForwardStitch.SetToolTip(_('Go forward one stitch (+)')) + self.btnBackwardCommand = wx.Button(self, -1, style=self.button_style) + self.btnBackwardCommand.Bind(wx.EVT_BUTTON, self.animation_one_command_backward) + self.btnBackwardCommand.SetBitmap(self.load_icon('backward_command')) + self.btnBackwardCommand.SetToolTip(_('Go backward one command (page-down)')) + self.btnForwardCommand = wx.Button(self, -1, style=self.button_style) + self.btnForwardCommand.Bind(wx.EVT_BUTTON, self.animation_one_command_forward) + self.btnForwardCommand.SetBitmap(self.load_icon('forward_command')) + self.btnForwardCommand.SetToolTip(_('Go forward one command (page-up)')) + self.btnForward = wx.ToggleButton(self, -1, style=self.button_style) + self.btnForward.SetValue(True) + self.btnForward.Bind(wx.EVT_TOGGLEBUTTON, self.on_forward_button) + self.btnForward.SetBitmap(self.load_icon('forward')) + self.btnForward.SetToolTip(_('Animate forward (arrow right)')) + self.btnReverse = wx.ToggleButton(self, -1, style=self.button_style) + self.btnReverse.Bind(wx.EVT_TOGGLEBUTTON, self.on_reverse_button) + self.btnReverse.SetBitmap(self.load_icon('reverse')) + self.btnReverse.SetToolTip(_('Animate in reverse (arrow right)')) + self.btnPlay = wx.ToggleButton(self, -1, style=self.button_style) + self.btnPlay.Bind(wx.EVT_TOGGLEBUTTON, self.on_play_button) + self.btnPlay.SetBitmap(self.load_icon('play')) + self.btnPlay.SetToolTip(_('Play (P)')) + self.btnPause = wx.ToggleButton(self, -1, style=self.button_style) + self.btnPause.Bind(wx.EVT_TOGGLEBUTTON, self.on_pause_button) + self.btnPause.SetBitmap(self.load_icon('pause')) + self.btnPause.SetToolTip(_('Pause (P)')) + self.btnRestart = wx.Button(self, -1, style=self.button_style) + self.btnRestart.Bind(wx.EVT_BUTTON, self.animation_restart) + self.btnRestart.SetBitmap(self.load_icon('restart')) + self.btnRestart.SetToolTip(_('Restart (R)')) + self.btnNpp = wx.ToggleButton(self, -1, style=self.button_style) + self.btnNpp.Bind(wx.EVT_TOGGLEBUTTON, self.toggle_npp) + self.btnNpp.SetBitmap(self.load_icon('npp')) + self.btnNpp.SetToolTip(_('Display needle penetration point (O)')) + self.slider = SimulatorSlider(self, -1, value=1, minValue=1, maxValue=2) self.slider.Bind(wx.EVT_SLIDER, self.on_slider) self.stitchBox = IntCtrl(self, -1, value=1, min=1, max=2, limited=True, allow_none=True, style=wx.TE_PROCESS_ENTER) self.stitchBox.Bind(wx.EVT_LEFT_DOWN, self.on_stitch_box_focus) @@ -83,24 +109,89 @@ class ControlPanel(wx.Panel): self.stitchBox.Bind(wx.EVT_TEXT_ENTER, self.on_stitch_box_focusout) self.stitchBox.Bind(wx.EVT_KILL_FOCUS, self.on_stitch_box_focusout) self.Bind(wx.EVT_LEFT_DOWN, self.on_stitch_box_focusout) + self.btnJump = wx.ToggleButton(self, -1, style=self.button_style) + self.btnJump.SetToolTip(_('Show jump stitches')) + self.btnJump.SetBitmap(self.load_icon('jump')) + self.btnJump.Bind(wx.EVT_TOGGLEBUTTON, lambda event: self.on_marker_button('jump', event)) + self.btnTrim = wx.ToggleButton(self, -1, style=self.button_style) + self.btnTrim.SetToolTip(_('Show trims')) + self.btnTrim.SetBitmap(self.load_icon('trim')) + self.btnTrim.Bind(wx.EVT_TOGGLEBUTTON, lambda event: self.on_marker_button('trim', event)) + self.btnStop = wx.ToggleButton(self, -1, style=self.button_style) + self.btnStop.SetToolTip(_('Show stops')) + self.btnStop.SetBitmap(self.load_icon('stop')) + self.btnStop.Bind(wx.EVT_TOGGLEBUTTON, lambda event: self.on_marker_button('stop', event)) + self.btnColorChange = wx.ToggleButton(self, -1, style=self.button_style) + self.btnColorChange.SetToolTip(_('Show color changes')) + self.btnColorChange.SetBitmap(self.load_icon('color_change')) + self.btnColorChange.Bind(wx.EVT_TOGGLEBUTTON, lambda event: self.on_marker_button('color_change', event)) # Layout + self.hbSizer1 = wx.BoxSizer(wx.HORIZONTAL) + self.hbSizer1.Add(self.slider, 1, wx.EXPAND | wx.RIGHT, 10) + self.hbSizer1.Add(self.stitchBox, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 10) + + self.command_sizer = wx.StaticBoxSizer(wx.StaticBox(self, wx.ID_ANY, _("Command")), wx.VERTICAL) + self.command_text = wx.StaticText(self, wx.ID_ANY, label="", style=wx.ALIGN_CENTRE_HORIZONTAL | wx.ST_NO_AUTORESIZE) + self.command_text.SetFont(wx.Font(wx.FontInfo(20).Bold())) + self.command_text.SetMinSize(self.get_max_command_text_size()) + self.command_sizer.Add(self.command_text, 0, wx.EXPAND | wx.ALL, 10) + self.hbSizer1.Add(self.command_sizer, 0, wx.EXPAND) + + self.controls_sizer = wx.StaticBoxSizer(wx.StaticBox(self, wx.ID_ANY, _("Controls")), wx.HORIZONTAL) + self.controls_inner_sizer = wx.BoxSizer(wx.HORIZONTAL) + self.controls_inner_sizer.Add(self.btnBackwardCommand, 0, wx.EXPAND | wx.ALL, 2) + self.controls_inner_sizer.Add(self.btnBackwardStitch, 0, wx.EXPAND | wx.ALL, 2) + self.controls_inner_sizer.Add(self.btnForwardStitch, 0, wx.EXPAND | wx.ALL, 2) + self.controls_inner_sizer.Add(self.btnForwardCommand, 0, wx.EXPAND | wx.ALL, 2) + self.controls_inner_sizer.Add(self.btnReverse, 0, wx.EXPAND | wx.ALL, 2) + self.controls_inner_sizer.Add(self.btnForward, 0, wx.EXPAND | wx.ALL, 2) + self.controls_inner_sizer.Add(self.btnPlay, 0, wx.EXPAND | wx.ALL, 2) + self.controls_inner_sizer.Add(self.btnPause, 0, wx.EXPAND | wx.ALL, 2) + self.controls_inner_sizer.Add(self.btnRestart, 0, wx.EXPAND | wx.ALL, 2) + self.controls_sizer.Add((1, 1), 1) + self.controls_sizer.Add(self.controls_inner_sizer, 0, wx.ALIGN_CENTER_VERTICAL | wx.ALL, 10) + self.controls_sizer.Add((1, 1), 1) + + self.show_sizer = wx.StaticBoxSizer(wx.StaticBox(self, wx.ID_ANY, _("Show")), wx.HORIZONTAL) + self.show_inner_sizer = wx.BoxSizer(wx.HORIZONTAL) + self.show_inner_sizer.Add(self.btnNpp, 0, wx.EXPAND | wx.ALL, 2) + self.show_inner_sizer.Add(self.btnJump, 0, wx.ALL, 2) + self.show_inner_sizer.Add(self.btnTrim, 0, wx.ALL, 2) + self.show_inner_sizer.Add(self.btnStop, 0, wx.ALL, 2) + self.show_inner_sizer.Add(self.btnColorChange, 0, wx.ALL, 2) + self.show_sizer.Add((1, 1), 1) + self.show_sizer.Add(self.show_inner_sizer, 0, wx.ALIGN_CENTER_VERTICAL | wx.ALL, 10) + self.show_sizer.Add((1, 1), 1) + + self.speed_sizer = wx.StaticBoxSizer(wx.StaticBox(self, wx.ID_ANY, _("Speed")), wx.VERTICAL) + + self.speed_buttons_sizer = wx.BoxSizer(wx.HORIZONTAL) + self.speed_buttons_sizer.Add((1, 1), 1) + self.speed_buttons_sizer.Add(self.btnMinus, 0, wx.ALL, 2) + self.speed_buttons_sizer.Add(self.btnPlus, 0, wx.ALL, 2) + self.speed_buttons_sizer.Add((1, 1), 1) + self.speed_sizer.Add(self.speed_buttons_sizer, 0, wx.EXPAND | wx.ALL) + self.speed_text = wx.StaticText(self, wx.ID_ANY, label="", style=wx.ALIGN_CENTRE_HORIZONTAL | wx.ST_NO_AUTORESIZE) + self.speed_text.SetFont(wx.Font(wx.FontInfo(15).Bold())) + extent = self.speed_text.GetTextExtent(self.format_speed_text(100000)) + self.speed_text.SetMinSize(extent) + self.speed_sizer.Add(self.speed_text, 0, wx.EXPAND | wx.ALL, 5) + + # A normal BoxSizer can only make child components the same or + # proportional size. A FlexGridSizer can split up the available extra + # space evenly among all growable columns. + self.control_row2_sizer = wx.FlexGridSizer(cols=3, vgap=0, hgap=5) + self.control_row2_sizer.AddGrowableCol(0) + self.control_row2_sizer.AddGrowableCol(1) + self.control_row2_sizer.AddGrowableCol(2) + self.control_row2_sizer.Add(self.controls_sizer, 0, wx.EXPAND) + self.control_row2_sizer.Add(self.speed_sizer, 0, wx.EXPAND) + self.control_row2_sizer.Add(self.show_sizer, 0, wx.EXPAND) + self.vbSizer = vbSizer = wx.BoxSizer(wx.VERTICAL) - self.hbSizer1 = hbSizer1 = wx.BoxSizer(wx.HORIZONTAL) - self.hbSizer2 = hbSizer2 = wx.BoxSizer(wx.HORIZONTAL) - hbSizer1.Add(self.slider, 1, wx.EXPAND | wx.ALL, 3) - hbSizer1.Add(self.stitchBox, 0, wx.ALL | wx.ALIGN_CENTER_VERTICAL, 2) - vbSizer.Add(hbSizer1, 1, wx.EXPAND | wx.ALL, 3) - hbSizer2.Add(self.btnMinus, 0, wx.EXPAND | wx.ALL, 2) - hbSizer2.Add(self.btnPlus, 0, wx.EXPAND | wx.ALL, 2) - hbSizer2.Add(self.btnBackwardStitch, 0, wx.EXPAND | wx.ALL, 2) - hbSizer2.Add(self.btnForwardStitch, 0, wx.EXPAND | wx.ALL, 2) - hbSizer2.Add(self.directionBtn, 0, wx.EXPAND | wx.ALL, 2) - hbSizer2.Add(self.pauseBtn, 0, wx.EXPAND | wx.ALL, 2) - hbSizer2.Add(self.restartBtn, 0, wx.EXPAND | wx.ALL, 2) - hbSizer2.Add(self.nppBtn, 0, wx.EXPAND | wx.ALL, 2) - hbSizer2.Add(self.quitBtn, 0, wx.EXPAND | wx.ALL, 2) - vbSizer.Add(hbSizer2, 0, wx.EXPAND | wx.ALL, 3) + vbSizer.Add(self.hbSizer1, 1, wx.EXPAND | wx.ALL, 10) + vbSizer.Add(self.control_row2_sizer, 0, wx.EXPAND | wx.LEFT | wx.RIGHT | wx.BOTTOM, 10) self.SetSizerAndFit(vbSizer) # Keyboard Shortcuts @@ -125,9 +216,13 @@ class ControlPanel(wx.Panel): (wx.ACCEL_NORMAL, wx.WXK_NUMPAD_SUBTRACT, self.animation_one_stitch_backward), (wx.ACCEL_NORMAL, ord('r'), self.animation_restart), (wx.ACCEL_NORMAL, ord('o'), self.on_toggle_npp_shortcut), - (wx.ACCEL_NORMAL, ord('p'), self.on_pause_start_button), - (wx.ACCEL_NORMAL, wx.WXK_SPACE, self.on_pause_start_button), - (wx.ACCEL_NORMAL, ord('q'), self.animation_quit)] + (wx.ACCEL_NORMAL, ord('p'), self.play_or_pause), + (wx.ACCEL_NORMAL, wx.WXK_SPACE, self.play_or_pause), + (wx.ACCEL_NORMAL, ord('q'), self.animation_quit), + (wx.ACCEL_NORMAL, wx.WXK_PAGEDOWN, self.animation_one_command_backward), + (wx.ACCEL_NORMAL, wx.WXK_PAGEUP, self.animation_one_command_forward), + + ] self.accel_entries = [] @@ -140,11 +235,14 @@ class ControlPanel(wx.Panel): self.SetAcceleratorTable(self.accel_table) self.SetFocus() + # wait for layouts so that panel size is set + wx.CallLater(50, self.load, self.stitch_plan) + def set_drawing_panel(self, drawing_panel): self.drawing_panel = drawing_panel self.drawing_panel.set_speed(self.speed) - def set_num_stitches(self, num_stitches): + def _set_num_stitches(self, num_stitches): if num_stitches < 2: # otherwise the slider and intctrl get mad num_stitches = 2 @@ -153,6 +251,41 @@ class ControlPanel(wx.Panel): self.slider.SetMax(num_stitches) self.choose_speed() + def add_color(self, color, num_stitches): + start = self._last_color_block_end + 1 + self.slider.add_color_section(ColorSection(color.rgb, start, start + num_stitches - 1)) + self._last_color_block_end = self._last_color_block_end + num_stitches + + def load(self, stitch_plan): + self.stitches = [] + self._set_num_stitches(stitch_plan.num_stitches) + + stitch_num = 0 + for color_block in stitch_plan.color_blocks: + self.stitches.extend(color_block.stitches) + + start = stitch_num + 1 + end = start + color_block.num_stitches + self.slider.add_color_section(color_block.color.rgb, start, end) + + for stitch_num, stitch in enumerate(color_block.stitches, start): + if stitch.trim: + self.slider.add_marker("trim", stitch_num) + elif stitch.stop: + self.slider.add_marker("stop", stitch_num) + elif stitch.jump: + self.slider.add_marker("jump", stitch_num) + elif stitch.color_change: + self.slider.add_marker("color_change", stitch_num) + + def load_icon(self, icon_name): + icon = wx.Image(os.path.join(self.icons_dir, f"{icon_name}.png")) + icon.Rescale(self.button_size, self.button_size, wx.IMAGE_QUALITY_HIGH) + return icon.ConvertToBitmap() + + def on_marker_button(self, marker_type, event): + self.slider.enable_marker_list(marker_type, event.GetEventObject().GetValue()) + def choose_speed(self): if self.target_duration: self.set_speed(int(self.num_stitches / float(self.target_duration))) @@ -160,22 +293,24 @@ class ControlPanel(wx.Panel): self.set_speed(self.target_stitches_per_second) def animation_forward(self, event=None): - self.directionBtn.SetLabel("<<") + self.btnForward.SetValue(True) + self.btnReverse.SetValue(False) self.drawing_panel.forward() self.direction = 1 self.update_speed_text() def animation_reverse(self, event=None): - self.directionBtn.SetLabel(">>") + self.btnForward.SetValue(False) + self.btnReverse.SetValue(True) self.drawing_panel.reverse() self.direction = -1 self.update_speed_text() - def on_direction_button(self, event): - if self.direction == 1: - self.animation_reverse() - else: - self.animation_forward() + def on_forward_button(self, event): + self.animation_forward() + + def on_reverse_button(self, event): + self.animation_reverse() def set_speed(self, speed): self.speed = int(max(speed, 1)) @@ -184,9 +319,15 @@ class ControlPanel(wx.Panel): if self.drawing_panel: self.drawing_panel.set_speed(self.speed) + def format_speed_text(self, speed): + return _('%d stitches/sec') % speed + def update_speed_text(self): - self.statusbar.SetStatusText(_('Speed: %d stitches/sec') % (self.speed * self.direction), 0) - self.hbSizer2.Layout() + self.speed_text.SetLabel(self.format_speed_text(self.speed * self.direction)) + + def get_max_command_text_size(self): + extents = [self.command_text.GetTextExtent(command) for command in COMMAND_NAMES] + return max(extents, key=lambda extent: extent.x) def on_slider(self, event): stitch = event.GetEventObject().GetValue() @@ -202,7 +343,7 @@ class ControlPanel(wx.Panel): self.current_stitch = stitch self.slider.SetValue(stitch) self.stitchBox.SetValue(stitch) - self.statusbar.SetStatusText(COMMAND_NAMES[command], 1) + self.command_text.SetLabel(COMMAND_NAMES[command]) def on_stitch_box_focus(self, event): self.animation_pause() @@ -238,14 +379,23 @@ class ControlPanel(wx.Panel): self.drawing_panel.go() def on_start(self): - self.pauseBtn.SetLabel(_('Pause')) + self.btnPause.SetValue(False) + self.btnPlay.SetValue(True) def on_stop(self): - self.pauseBtn.SetLabel(_('Start')) + self.btnPause.SetValue(True) + self.btnPlay.SetValue(False) - def on_pause_start_button(self, event): + def on_pause_button(self, event): """""" - if self.pauseBtn.GetLabel() == _('Pause'): + self.animation_pause() + + def on_play_button(self, event): + """""" + self.animation_start() + + def play_or_pause(self, event): + if self.drawing_panel.animating: self.animation_pause() else: self.animation_start() @@ -258,6 +408,28 @@ class ControlPanel(wx.Panel): self.animation_pause() self.drawing_panel.one_stitch_backward() + def animation_one_command_backward(self, event): + self.animation_pause() + stitch_number = self.current_stitch - 1 + while stitch_number >= 1: + # stitch number shown to the user starts at 1 + stitch = self.stitches[stitch_number - 1] + if stitch.jump or stitch.trim or stitch.stop or stitch.color_change: + break + stitch_number -= 1 + self.drawing_panel.set_current_stitch(stitch_number) + + def animation_one_command_forward(self, event): + self.animation_pause() + stitch_number = self.current_stitch + 1 + while stitch_number <= self.num_stitches: + # stitch number shown to the user starts at 1 + stitch = self.stitches[stitch_number - 1] + if stitch.jump or stitch.trim or stitch.stop or stitch.color_change: + break + stitch_number += 1 + self.drawing_panel.set_current_stitch(stitch_number) + def animation_quit(self, event): self.parent.quit() @@ -265,13 +437,11 @@ class ControlPanel(wx.Panel): self.drawing_panel.restart() def on_toggle_npp_shortcut(self, event): - self.nppBtn.SetValue(not self.nppBtn.GetValue()) + self.btnNpp.SetValue(not self.btnNpp.GetValue()) self.toggle_npp(event) def toggle_npp(self, event): - if self.pauseBtn.GetLabel() == _('Start'): - stitch = self.stitchBox.GetValue() - self.drawing_panel.set_current_stitch(stitch) + self.drawing_panel.Refresh() class DrawingPanel(wx.Panel): @@ -405,8 +575,8 @@ class DrawingPanel(wx.Panel): canvas.SetTransform(canvas.CreateMatrix()) crosshair_radius = 10 canvas.SetPen(self.black_pen) - canvas.DrawLines(((x - crosshair_radius, y), (x + crosshair_radius, y))) - canvas.DrawLines(((x, y - crosshair_radius), (x, y + crosshair_radius))) + canvas.StrokeLines(((x - crosshair_radius, y), (x + crosshair_radius, y))) + canvas.StrokeLines(((x, y - crosshair_radius), (x, y + crosshair_radius))) def draw_scale(self, canvas): canvas.BeginLayer(1) @@ -433,13 +603,13 @@ class DrawingPanel(wx.Panel): scale_lower_left_x = 20 scale_lower_left_y = canvas_height - 30 - canvas.DrawLines(((scale_lower_left_x, scale_lower_left_y - 6), - (scale_lower_left_x, scale_lower_left_y), - (scale_lower_left_x + scale_width / 2.0, scale_lower_left_y), - (scale_lower_left_x + scale_width / 2.0, scale_lower_left_y - 3), - (scale_lower_left_x + scale_width / 2.0, scale_lower_left_y), - (scale_lower_left_x + scale_width, scale_lower_left_y), - (scale_lower_left_x + scale_width, scale_lower_left_y - 5))) + canvas.StrokeLines(((scale_lower_left_x, scale_lower_left_y - 6), + (scale_lower_left_x, scale_lower_left_y), + (scale_lower_left_x + scale_width / 2.0, scale_lower_left_y), + (scale_lower_left_x + scale_width / 2.0, scale_lower_left_y - 3), + (scale_lower_left_x + scale_width / 2.0, scale_lower_left_y), + (scale_lower_left_x + scale_width, scale_lower_left_y), + (scale_lower_left_x + scale_width, scale_lower_left_y - 6))) canvas.SetFont(wx.Font(12, wx.DEFAULT, wx.NORMAL, wx.NORMAL), wx.Colour((0, 0, 0))) canvas.DrawText("%s mm" % scale_width_mm, scale_lower_left_x, scale_lower_left_y + 5) @@ -447,7 +617,7 @@ class DrawingPanel(wx.Panel): canvas.EndLayer() def draw_needle_penetration_points(self, canvas, pen, stitches): - if self.control_panel.nppBtn.GetValue(): + if self.control_panel.btnNpp.GetValue(): npp_pen = wx.Pen(pen.GetColour(), width=int(0.5 * PIXELS_PER_MM * self.PIXEL_DENSITY)) canvas.SetPen(npp_pen) canvas.StrokeLineSegments(stitches, [(stitch[0] + 0.001, stitch[1]) for stitch in stitches]) @@ -460,11 +630,10 @@ class DrawingPanel(wx.Panel): self.current_stitch = 1 self.direction = 1 self.last_frame_duration = 0 - self.num_stitches = stitch_plan.num_stitches - self.control_panel.set_num_stitches(self.num_stitches) self.minx, self.miny, self.maxx, self.maxy = stitch_plan.bounding_box self.width = self.maxx - self.minx self.height = self.maxy - self.miny + self.num_stitches = stitch_plan.num_stitches self.parse_stitch_plan(stitch_plan) self.choose_zoom_and_pan() self.set_current_stitch(0) @@ -640,6 +809,141 @@ class DrawingPanel(wx.Panel): self.Refresh() +class MarkerList(list): + def __init__(self, icon_name, stitch_numbers=()): + super().__init__(self) + icons_dir = get_resource_dir("icons") + self.icon_name = icon_name + self.icon = wx.Image(os.path.join(icons_dir, f"{icon_name}.png")).ConvertToBitmap() + self.enabled = False + self.extend(stitch_numbers) + + def __repr__(self): + return f"MarkerList({self.icon_name})" + + +class ColorSection: + def __init__(self, color, start, end): + self.color = color + self.start = start + self.end = end + self.brush = wx.Brush(wx.Colour(*color)) + + +class SimulatorSlider(wx.Panel): + PROXY_EVENTS = (wx.EVT_SLIDER,) + + def __init__(self, parent, id=wx.ID_ANY, *args, **kwargs): + super().__init__(parent, id) + + kwargs['style'] = wx.SL_HORIZONTAL | wx.SL_LABELS + + self.sizer = wx.BoxSizer(wx.VERTICAL) + self.slider = wx.Slider(self, *args, **kwargs) + self.sizer.Add(self.slider, 0, wx.EXPAND) + + # add 33% additional vertical space for marker icons + size = self.sizer.CalcMin() + self.sizer.Add((10, size.height // 3), 1, wx.EXPAND) + self.SetSizerAndFit(self.sizer) + + self.marker_lists = { + "trim": MarkerList("trim"), + "stop": MarkerList("stop"), + "jump": MarkerList("jump"), + "color_change": MarkerList("color_change"), + } + self.marker_pen = wx.Pen(wx.Colour(0, 0, 0)) + self.color_sections = [] + self.margin = 13 + self.color_bar_start = 0.25 + self.color_bar_thickness = 0.25 + self.marker_start = 0.375 + self.marker_end = 0.75 + self.marker_icon_start = 0.75 + self.marker_icon_size = size.height // 3 + + self.Bind(wx.EVT_PAINT, self.on_paint) + self.Bind(wx.EVT_ERASE_BACKGROUND, self.on_erase_background) + + def SetMax(self, value): + self.slider.SetMax(value) + + def SetMin(self, value): + self.slider.SetMin(value) + + def SetValue(self, value): + self.slider.SetValue(value) + + def Bind(self, event, callback, *args, **kwargs): + if event in self.PROXY_EVENTS: + self.slider.Bind(event, callback, *args, **kwargs) + else: + super().Bind(event, callback, *args, **kwargs) + + def add_color_section(self, color, start, end): + self.color_sections.append(ColorSection(color, start, end)) + + def add_marker(self, name, location): + self.marker_lists[name].append(location) + self.Refresh() + + def enable_marker_list(self, name, enabled=True): + self.marker_lists[name].enabled = enabled + self.Refresh() + + def disable_marker_list(self, name): + self.marker_lists[name].enabled = False + self.Refresh() + + def toggle_marker_list(self, name): + self.marker_lists[name].enabled = not self.marker_lists[name].enabled + self.Refresh() + + def on_paint(self, event): + dc = wx.BufferedPaintDC(self) + background_brush = wx.Brush(self.GetTopLevelParent().GetBackgroundColour(), wx.SOLID) + dc.SetBackground(background_brush) + dc.Clear() + gc = wx.GraphicsContext.Create(dc) + + width, height = self.GetSize() + min_value = self.slider.GetMin() + max_value = self.slider.GetMax() + spread = max_value - min_value + + def _value_to_x(value): + return (value - min_value) * (width - 2 * self.margin) / spread + self.margin + + gc.SetPen(wx.NullPen) + for color_section in self.color_sections: + gc.SetBrush(color_section.brush) + + start_x = _value_to_x(color_section.start) + end_x = _value_to_x(color_section.end) + gc.DrawRectangle(start_x, height * self.color_bar_start, + end_x - start_x, height * self.color_bar_thickness) + + gc.SetPen(self.marker_pen) + for marker_list in self.marker_lists.values(): + if marker_list.enabled: + for value in marker_list: + x = _value_to_x(value) + gc.StrokeLine( + x, height * self.marker_start, + x, height * self.marker_end + ) + gc.DrawBitmap( + marker_list.icon, + x - self.marker_icon_size / 2, height * self.marker_icon_start, + self.marker_icon_size, self.marker_icon_size + ) + + def on_erase_background(self, event): + # supposedly this prevents flickering? + pass + + class SimulatorPanel(wx.Panel): """""" @@ -675,6 +979,7 @@ class SimulatorPanel(wx.Panel): def load(self, stitch_plan): self.dp.load(stitch_plan) + self.cp.load(stitch_plan) def clear(self): self.dp.clear() @@ -687,8 +992,6 @@ class EmbroiderySimulator(wx.Frame): stitches_per_second = kwargs.pop('stitches_per_second', 16) target_duration = kwargs.pop('target_duration', None) wx.Frame.__init__(self, *args, **kwargs) - self.statusbar = self.CreateStatusBar(2) - self.statusbar.SetStatusWidths([250, -1]) sizer = wx.BoxSizer(wx.HORIZONTAL) self.simulator_panel = SimulatorPanel(self, @@ -839,6 +1142,8 @@ class SimulatorPreview(Thread): on_close=self.simulate_window_closed, target_duration=self.target_duration) except Exception: + import traceback + print(traceback.format_exc(), file=sys.stderr) try: # a window may have been created, so we need to destroy it # or the app will never exit |
