Browse Source

add shift control

master
Alexandros Theodotou 3 years ago
parent
commit
9387369109
Signed by: alex
GPG Key ID: 022EAE42313D70F3
  1. 75
      resources/down_arrow.svg
  2. 99
      resources/hmirror.svg
  3. 95
      resources/hmirror_click.svg
  4. 95
      resources/hmirror_hover.svg
  5. 99
      resources/vmirror.svg
  6. 95
      resources/vmirror_click.svg
  7. 95
      resources/vmirror_hover.svg
  8. 2
      subprojects/ztoolkit.wrap
  9. 2
      zlfo.ttl.in
  10. 240
      zlfo_ui.c
  11. 12
      zlfo_ui_theme.h

75
resources/down_arrow.svg

@ -0,0 +1,75 @@ @@ -0,0 +1,75 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="32"
height="32"
viewBox="0 0 8.4666673 8.4666659"
version="1.1"
id="svg6776"
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
sodipodi:docname="down_arrow.svg">
<defs
id="defs6770" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="15.839192"
inkscape:cx="27.985753"
inkscape:cy="12.247617"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
showgrid="false"
units="px"
inkscape:window-width="1920"
inkscape:window-height="1025"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:window-maximized="1" />
<metadata
id="metadata6773">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-288.53333)">
<path
sodipodi:type="star"
style="display:inline;fill:#cfcfcd;fill-opacity:1;stroke:none;stroke-width:0.19179825;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="path2367"
sodipodi:sides="3"
sodipodi:cx="60.854172"
sodipodi:cy="158.75"
sodipodi:r1="1.5275683"
sodipodi:r2="0.76378411"
sodipodi:arg1="-0.52359878"
sodipodi:arg2="0.64350064"
inkscape:flatsided="false"
inkscape:rounded="0"
inkscape:randomized="0"
d="m 62.177085,157.98622 -0.711886,1.22205 -0.611027,1.0693 -0.702388,-1.22754 -0.620525,-1.06381 1.414273,0.005 z"
inkscape:transform-center-y="1.0455416"
transform="matrix(3.1137533,0,0,2.0758469,-185.25154,-37.566782)" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.4 KiB

99
resources/hmirror.svg

@ -0,0 +1,99 @@ @@ -0,0 +1,99 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="224"
height="120"
viewBox="0 0 59.266671 31.749997"
version="1.1"
id="svg6776"
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
sodipodi:docname="hmirror.svg">
<defs
id="defs6770" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="3.959798"
inkscape:cx="80.572719"
inkscape:cy="34.034105"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
showgrid="false"
units="px"
inkscape:window-width="1920"
inkscape:window-height="1025"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:window-maximized="1" />
<metadata
id="metadata6773">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-265.25)">
<g
id="g7340"
transform="matrix(5.7435879,0,0,5.7142832,-183.11875,-387.92232)">
<rect
style="display:inline;fill:#323232;fill-opacity:1;stroke:none;stroke-width:0.09652849;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect2186"
width="10.318753"
height="5.5562525"
x="31.88229"
y="114.30521"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96" />
<rect
inkscape:export-ydpi="96"
inkscape:export-xdpi="96"
y="114.56979"
x="32.146877"
height="5.0687008"
width="9.7895803"
id="rect2188"
style="display:inline;fill:#5a5a5a;fill-opacity:1;stroke:none;stroke-width:0.08980102;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<g
inkscape:export-ydpi="96"
inkscape:export-xdpi="96"
transform="rotate(90,199.29342,1.6976376)"
id="g2208"
style="display:inline">
<path
sodipodi:nodetypes="cccccccc"
inkscape:connector-curvature="0"
style="display:inline;fill:#cfcfcd;fill-opacity:1;stroke-width:0.15426883"
d="m 314.69992,161.74935 -1.23398,1.23398 h 1.07973 v 0.70145 h 0.3085 v -0.70145 h 1.07973 z"
id="path2204" />
<path
id="path2206"
d="m 314.69992,166.14938 -1.23398,-1.23398 h 1.07973 v -0.70145 h 0.3085 v 0.70145 h 1.07973 z"
style="display:inline;fill:#cfcfcd;fill-opacity:1;stroke-width:0.15426883"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccccc" />
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.3 KiB

95
resources/hmirror_click.svg

@ -0,0 +1,95 @@ @@ -0,0 +1,95 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="224"
height="120"
viewBox="0 0 59.266671 31.749997"
version="1.1"
id="svg6776"
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
sodipodi:docname="hmirror_active.svg">
<defs
id="defs6770" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="3.959798"
inkscape:cx="33.600626"
inkscape:cy="34.034105"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
showgrid="false"
units="px"
inkscape:window-width="1920"
inkscape:window-height="1025"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:window-maximized="1" />
<metadata
id="metadata6773">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-265.25)">
<rect
inkscape:export-ydpi="96"
inkscape:export-xdpi="96"
y="265.25"
x="-1.5583752e-05"
height="31.75"
width="59.266666"
id="rect2186"
style="display:inline;fill:#323232;fill-opacity:1;stroke:none;stroke-width:0.55300373;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<rect
style="display:inline;fill:#ff6501;fill-opacity:1;stroke:none;stroke-width:0.51446259;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect2188"
width="56.227314"
height="28.963991"
x="1.5196654"
y="266.76193"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96" />
<g
style="display:inline"
id="g2208"
transform="matrix(0,5.7142832,-5.7435879,0,971.29106,-1517.0406)"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96">
<path
id="path2204"
d="m 314.69992,161.74935 -1.23398,1.23398 h 1.07973 v 0.70145 h 0.3085 v -0.70145 h 1.07973 z"
style="display:inline;fill:#cfcfcd;fill-opacity:1;stroke-width:0.15426883"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccccc" />
<path
sodipodi:nodetypes="cccccccc"
inkscape:connector-curvature="0"
style="display:inline;fill:#cfcfcd;fill-opacity:1;stroke-width:0.15426883"
d="m 314.69992,166.14938 -1.23398,-1.23398 h 1.07973 v -0.70145 h 0.3085 v 0.70145 h 1.07973 z"
id="path2206" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.2 KiB

95
resources/hmirror_hover.svg

@ -0,0 +1,95 @@ @@ -0,0 +1,95 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="224"
height="120"
viewBox="0 0 59.266671 31.749997"
version="1.1"
id="svg6776"
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
sodipodi:docname="hmirror_hover.svg">
<defs
id="defs6770" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="3.959798"
inkscape:cx="33.600626"
inkscape:cy="34.034105"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
showgrid="false"
units="px"
inkscape:window-width="1920"
inkscape:window-height="1025"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:window-maximized="1" />
<metadata
id="metadata6773">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-265.25)">
<rect
inkscape:export-ydpi="96"
inkscape:export-xdpi="96"
y="265.25"
x="-1.5583752e-05"
height="31.75"
width="59.266666"
id="rect2186"
style="display:inline;fill:#323232;fill-opacity:1;stroke:none;stroke-width:0.55300373;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<rect
style="display:inline;fill:#696969;fill-opacity:1;stroke:none;stroke-width:0.51446259;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect2188"
width="56.227314"
height="28.963991"
x="1.5196654"
y="266.76193"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96" />
<g
style="display:inline"
id="g2208"
transform="matrix(0,5.7142832,-5.7435879,0,971.29106,-1517.0406)"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96">
<path
id="path2204"
d="m 314.69992,161.74935 -1.23398,1.23398 h 1.07973 v 0.70145 h 0.3085 v -0.70145 h 1.07973 z"
style="display:inline;fill:#cfcfcd;fill-opacity:1;stroke-width:0.15426883"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccccc" />
<path
sodipodi:nodetypes="cccccccc"
inkscape:connector-curvature="0"
style="display:inline;fill:#cfcfcd;fill-opacity:1;stroke-width:0.15426883"
d="m 314.69992,166.14938 -1.23398,-1.23398 h 1.07973 v -0.70145 h 0.3085 v 0.70145 h 1.07973 z"
id="path2206" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.2 KiB

99
resources/vmirror.svg

@ -0,0 +1,99 @@ @@ -0,0 +1,99 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="224"
height="120"
viewBox="0 0 59.266671 31.749997"
version="1.1"
id="svg6776"
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
sodipodi:docname="vmirror.svg">
<defs
id="defs6770" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="3.959798"
inkscape:cx="80.572719"
inkscape:cy="34.034105"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
showgrid="false"
units="px"
inkscape:window-width="1920"
inkscape:window-height="1025"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:window-maximized="1" />
<metadata
id="metadata6773">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-265.25)">
<g
id="g7446"
transform="matrix(5.7435879,0,0,5.7142832,-125.41036,-1317.5093)">
<rect
inkscape:export-ydpi="96"
inkscape:export-xdpi="96"
y="276.983"
x="21.834846"
height="5.5562525"
width="10.318753"
id="rect2176"
style="display:inline;fill:#323232;fill-opacity:1;stroke:none;stroke-width:0.09652849;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<rect
style="display:inline;fill:#5a5a5a;fill-opacity:1;stroke:none;stroke-width:0.08980102;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect2178"
width="9.7895803"
height="5.0687008"
x="22.099434"
y="277.24759"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96" />
<g
inkscape:export-ydpi="96"
inkscape:export-xdpi="96"
transform="translate(-287.70566,115.83256)"
id="g2202"
style="display:inline">
<path
id="path2195"
d="m 314.69992,161.74935 -1.23398,1.23398 h 1.07973 v 0.70145 h 0.3085 v -0.70145 h 1.07973 z"
style="display:inline;fill:#cfcfcd;fill-opacity:1;stroke-width:0.15426883"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccccc" />
<path
sodipodi:nodetypes="cccccccc"
inkscape:connector-curvature="0"
style="display:inline;fill:#cfcfcd;fill-opacity:1;stroke-width:0.15426883"
d="m 314.69992,166.14938 -1.23398,-1.23398 h 1.07973 v -0.70145 h 0.3085 v 0.70145 h 1.07973 z"
id="path2198" />
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.3 KiB

95
resources/vmirror_click.svg

@ -0,0 +1,95 @@ @@ -0,0 +1,95 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="224"
height="120"
viewBox="0 0 59.266671 31.749997"
version="1.1"
id="svg6776"
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
sodipodi:docname="vmirror_active.svg">
<defs
id="defs6770" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="3.959798"
inkscape:cx="80.572719"
inkscape:cy="34.034105"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
showgrid="false"
units="px"
inkscape:window-width="1920"
inkscape:window-height="1025"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:window-maximized="1" />
<metadata
id="metadata6773">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-265.25)">
<rect
style="display:inline;fill:#323232;fill-opacity:1;stroke:none;stroke-width:0.55300373;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect2176"
width="59.266666"
height="31.75"
x="1.3612595e-07"
y="265.25"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96" />
<rect
inkscape:export-ydpi="96"
inkscape:export-xdpi="96"
y="266.76193"
x="1.5196811"
height="28.963991"
width="56.227314"
id="rect2178"
style="display:inline;fill:#ff6501;fill-opacity:1;stroke:none;stroke-width:0.51446259;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<g
style="display:inline"
id="g2202"
transform="matrix(5.7435879,0,0,5.7142832,-1777.8731,-655.60925)"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96">
<path
sodipodi:nodetypes="cccccccc"
inkscape:connector-curvature="0"
style="display:inline;fill:#cfcfcd;fill-opacity:1;stroke-width:0.15426883"
d="m 314.69992,161.74935 -1.23398,1.23398 h 1.07973 v 0.70145 h 0.3085 v -0.70145 h 1.07973 z"
id="path2195" />
<path
id="path2198"
d="m 314.69992,166.14938 -1.23398,-1.23398 h 1.07973 v -0.70145 h 0.3085 v 0.70145 h 1.07973 z"
style="display:inline;fill:#cfcfcd;fill-opacity:1;stroke-width:0.15426883"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccccc" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.2 KiB

95
resources/vmirror_hover.svg

@ -0,0 +1,95 @@ @@ -0,0 +1,95 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="224"
height="120"
viewBox="0 0 59.266671 31.749997"
version="1.1"
id="svg6776"
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
sodipodi:docname="vmirror_hover.svg">
<defs
id="defs6770" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="3.959798"
inkscape:cx="80.572719"
inkscape:cy="34.034105"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
showgrid="false"
units="px"
inkscape:window-width="1920"
inkscape:window-height="1025"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:window-maximized="1" />
<metadata
id="metadata6773">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-265.25)">
<rect
style="display:inline;fill:#323232;fill-opacity:1;stroke:none;stroke-width:0.55300373;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect2176"
width="59.266666"
height="31.75"
x="1.3612595e-07"
y="265.25"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96" />
<rect
inkscape:export-ydpi="96"
inkscape:export-xdpi="96"
y="266.76193"
x="1.5196811"
height="28.963991"
width="56.227314"
id="rect2178"
style="display:inline;fill:#696969;fill-opacity:1;stroke:none;stroke-width:0.51446259;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<g
style="display:inline"
id="g2202"
transform="matrix(5.7435879,0,0,5.7142832,-1777.8731,-655.60925)"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96">
<path
sodipodi:nodetypes="cccccccc"
inkscape:connector-curvature="0"
style="display:inline;fill:#cfcfcd;fill-opacity:1;stroke-width:0.15426883"
d="m 314.69992,161.74935 -1.23398,1.23398 h 1.07973 v 0.70145 h 0.3085 v -0.70145 h 1.07973 z"
id="path2195" />
<path
id="path2198"
d="m 314.69992,166.14938 -1.23398,-1.23398 h 1.07973 v -0.70145 h 0.3085 v 0.70145 h 1.07973 z"
style="display:inline;fill:#cfcfcd;fill-opacity:1;stroke-width:0.15426883"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccccc" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.2 KiB

2
subprojects/ztoolkit.wrap

@ -1,3 +1,3 @@ @@ -1,3 +1,3 @@
[wrap-git]
url = https://git.zrythm.org/git/ztoolkit
revision = d51f6e607b36e68960114d8faf3ee94210b2a7cd
revision = c40546947257081865a7a07ce268480fd7191d94

2
zlfo.ttl.in

@ -54,7 +54,7 @@ @@ -54,7 +54,7 @@
lv2:index 3 ;
lv2:symbol "phase" ;
lv2:name "Phase" ;
lv2:default 0.1 ;
lv2:default 0.5 ;
lv2:minimum 0.0 ;
lv2:maximum 1.0 ;
] , [

240
zlfo_ui.c

@ -98,6 +98,8 @@ typedef enum BotButton @@ -98,6 +98,8 @@ typedef enum BotButton
typedef enum GridButton
{
GRID_BTN_SNAP,
GRID_BTN_HMIRROR,
GRID_BTN_VMIRROR,
NUM_GRID_BUTTONS,
} GridButton;
@ -172,15 +174,6 @@ typedef struct DrawData @@ -172,15 +174,6 @@ typedef struct DrawData
/* FIXME uncomment */
#if 0
static void
set_freq (
void * obj,
float val)
{
ZLfoUi * self = (ZLfoUi *) obj;
self->freq = val;
SEND_PORT_EVENT (self, LFO_FREQ, self->freq);
}
static float
get_freq (
@ -434,12 +427,12 @@ bot_btn_draw_cb ( @@ -434,12 +427,12 @@ bot_btn_draw_cb (
is_normal ?
/* show border if normal */
widget->rect.y :
widget->rect.y - 4,
widget->rect.y - 3,
widget->rect.width,
is_normal ?
/* show border if normal */
widget->rect.height :
widget->rect.height + 4);
widget->rect.height + 3);
cairo_fill (cr);
@ -711,6 +704,8 @@ grid_btn_draw_cb ( @@ -711,6 +704,8 @@ grid_btn_draw_cb (
switch (data->val)
{
DRAW_SVG (SNAP, grid_snap);
DRAW_SVG (HMIRROR, hmirror);
DRAW_SVG (VMIRROR, vmirror);
default:
break;
}
@ -718,6 +713,121 @@ grid_btn_draw_cb ( @@ -718,6 +713,121 @@ grid_btn_draw_cb (
#undef DRAW_SVG
}
static float
shift_control_getter (
ZtkControl * control,
ZLfoUi * self)
{
return self->phase;
}
static void
shift_control_setter (
ZtkControl * control,
ZLfoUi * self,
float val)
{
self->phase = val;
SEND_PORT_EVENT (self, LFO_PHASE, self->phase);
}
/**
* Macro to get real value.
*/
#define GET_REAL_VAL \
((*ctrl->getter) (ctrl, ctrl->object))
/**
* MAcro to get real value from knob value.
*/
#define REAL_VAL_FROM_KNOB(knob) \
(ctrl->min + (float) knob * \
(ctrl->max - ctrl->min))
/**
* Converts from real value to knob value
*/
#define KNOB_VAL_FROM_REAL(real) \
(((float) real - ctrl->min) / \
(ctrl->max - ctrl->min))
/**
* Sets real val
*/
#define SET_REAL_VAL(real) \
((*ctrl->setter)(ctrl->object, (float) real))
static void
shift_control_draw_cb (
ZtkWidget * widget,
cairo_t * cr,
ZLfoUi * self)
{
ZtkControl * ctrl = (ZtkControl *) widget;
/* draw bg */
zlfo_ui_theme_set_cr_color (cr, button_normal);
cairo_rectangle (
cr, widget->rect.x, widget->rect.y,
widget->rect.width, widget->rect.height);
cairo_fill (cr);
/* draw black bg */
const int bg_padding = 2;
zlfo_ui_theme_set_cr_color (cr, bg);
cairo_rectangle (
cr, widget->rect.x + bg_padding,
widget->rect.y + bg_padding,
widget->rect.width - bg_padding * 2,
widget->rect.height - bg_padding * 2);
cairo_fill (cr);
/* set color */
if (widget->state & ZTK_WIDGET_STATE_PRESSED)
{
cairo_set_source_rgba (cr, 0.9, 0.9, 0.9, 1);
}
else if (widget->state & ZTK_WIDGET_STATE_HOVERED)
{
cairo_set_source_rgba (cr, 0.8, 0.8, 0.8, 1);
}
else
{
cairo_set_source_rgba (cr, 0.7, 0.7, 0.7, 1);
}
/* the half width of the available bar area */
double half_width =
(widget->rect.width - bg_padding * 2.0) / 2.0;
/* draw bar */
double real_val = (double) GET_REAL_VAL;
if (real_val < 0.5)
{
double work_val = real_val / 0.5;
cairo_rectangle (
cr,
widget->rect.x + bg_padding +
work_val * half_width,
widget->rect.y + bg_padding,
half_width - work_val * half_width,
widget->rect.height - bg_padding * 2);
}
else
{
double work_val = (real_val - 0.5) / 0.5;
cairo_rectangle (
cr,
widget->rect.x + bg_padding +
half_width + work_val * half_width,
widget->rect.y + bg_padding,
half_width -
(half_width + work_val * half_width),
widget->rect.height - bg_padding * 2);
}
cairo_fill (cr);
}
static void
grid_lbl_draw_cb (
ZtkWidget * widget,
@ -750,6 +860,56 @@ grid_lbl_draw_cb ( @@ -750,6 +860,56 @@ grid_lbl_draw_cb (
#undef DRAW_SVG
}
typedef struct TestStruct
{
int id;
char label[600];
ZtkComboBox * combo;
} TestStruct;
static void
activate_cb (
ZtkWidget * widget,
TestStruct * test)
{
ztk_message (
"activate %p %d %s", test->combo,
test->id, test->label);
}
static void
button_event_cb (
ZtkWidget * widget,
const PuglEventButton * btn,
ZLfoUi * self)
{
if ((((PuglEvent *) btn)->type !=
PUGL_BUTTON_RELEASE) ||
(!ztk_widget_is_hit (widget, btn->x, btn->y)))
return;
ZtkComboBox * combo =
ztk_combo_box_new (
widget, 0, 0);
ztk_app_add_widget (
widget->app, (ZtkWidget *) combo, 100);
for (int i = 0; i < 90; i++)
{
TestStruct * test =
calloc (1, sizeof (TestStruct));
test->id = i;
test->combo = combo;
sprintf (test->label, "Test %d", i);
ztk_combo_box_add_text_element (
combo, test->label,
(ZtkWidgetActivateCallback) activate_cb,
test);
if (i % 3 == 0)
ztk_combo_box_add_separator (combo);
}
}
static void
add_grid_controls (
ZLfoUi * self)
@ -760,10 +920,31 @@ add_grid_controls ( @@ -760,10 +920,31 @@ add_grid_controls (
int start = LEFT_BTN_WIDTH + padding + 12;
for (int i = 0; i < NUM_GRID_BUTTONS; i++)
{
ZtkRect rect = {
start + padding + i * (width + padding),
TOP_BTN_HEIGHT + 12,
width, height };
ZtkRect rect;
switch (i)
{
case GRID_BTN_SNAP:
rect.x =
start + padding;
rect.width = 76;
break;
case GRID_BTN_HMIRROR:
rect.x =
start + padding + width + padding +
68;
rect.width = 40;
break;
case GRID_BTN_VMIRROR:
rect.x =
start + padding + width + padding +
110;
rect.width = 40;
break;
default:
break;
}
rect.height = 22;
rect.y = TOP_BTN_HEIGHT + 12;
DrawData * data =
calloc (1, sizeof (DrawData));
data->val = i;
@ -776,8 +957,28 @@ add_grid_controls ( @@ -776,8 +957,28 @@ add_grid_controls (
NULL, data);
ztk_app_add_widget (
self->app, (ZtkWidget *) da, 1);
((ZtkWidget *) da)->button_event_cb =
(ZtkWidgetButtonEventCallback)
button_event_cb;
}
/* add shift control */
ZtkRect rect = {
start + padding + width + padding + 210,
TOP_BTN_HEIGHT + 12, 76, 22 };
ZtkControl * control =
ztk_control_new (
&rect,
(ZtkControlGetter) shift_control_getter,
(ZtkControlSetter) shift_control_setter,
(ZtkWidgetDrawCallback) shift_control_draw_cb,
ZTK_CTRL_DRAG_HORIZONTAL,
self, 0.f, 1.f, 0.5f);
control->sensitivity = 0.02f;
ztk_app_add_widget (
self->app, (ZtkWidget *) control, 1);
/* add labels */
padding = 2;
width = 76;
@ -785,15 +986,13 @@ add_grid_controls ( @@ -785,15 +986,13 @@ add_grid_controls (
start = LEFT_BTN_WIDTH + padding;
for (int i = 0; i < NUM_LBL_TYPES; i++)
{
ZtkRect rect;
if (i == LBL_TYPE_INVERT)
{
rect.x = 156;
rect.x = 138;
}
else if (i == LBL_TYPE_SHIFT)
{
rect.x = 300;
rect.x = 282;
}
rect.y = TOP_BTN_HEIGHT + 12;
rect.width = width;
@ -941,6 +1140,9 @@ port_event ( @@ -941,6 +1140,9 @@ port_event (
case LFO_FREQ:
self->freq = * (const float *) buffer;
break;
case LFO_PHASE:
self->phase = * (const float *) buffer;
break;
default:
break;
}

12
zlfo_ui_theme.h

@ -79,6 +79,12 @@ typedef struct ZLfoUiTheme @@ -79,6 +79,12 @@ typedef struct ZLfoUiTheme
ZtkRsvgHandle * grid_snap_svg;
ZtkRsvgHandle * grid_snap_hover_svg;
ZtkRsvgHandle * grid_snap_click_svg;
ZtkRsvgHandle * hmirror_svg;
ZtkRsvgHandle * hmirror_hover_svg;
ZtkRsvgHandle * hmirror_click_svg;
ZtkRsvgHandle * vmirror_svg;
ZtkRsvgHandle * vmirror_hover_svg;
ZtkRsvgHandle * vmirror_click_svg;
ZtkRsvgHandle * invert_svg;
ZtkRsvgHandle * shift_svg;
@ -139,6 +145,12 @@ zlfo_ui_theme_init (void) @@ -139,6 +145,12 @@ zlfo_ui_theme_init (void)
LOAD_SVG (grid_snap);
LOAD_SVG (grid_snap_hover);
LOAD_SVG (grid_snap_click);
LOAD_SVG (hmirror);
LOAD_SVG (hmirror_hover);
LOAD_SVG (hmirror_click);
LOAD_SVG (vmirror);
LOAD_SVG (vmirror_hover);
LOAD_SVG (vmirror_click);
LOAD_SVG (invert);
LOAD_SVG (shift);
}

Loading…
Cancel
Save