Browse Source

Add the rest of the toolbar icons, remove File menu

tags/v0.6.1
Andrew Belt 7 years ago
parent
commit
a9f4c0e50d
18 changed files with 530 additions and 317 deletions
  1. +0
    -58
      res/icons/030-feed.svg
  2. +0
    -58
      res/icons/037-file-empty.svg
  3. +0
    -58
      res/icons/099-floppy-disk.svg
  4. +0
    -58
      res/icons/167-meter.svg
  5. +11
    -2
      res/icons/LICENSE.md
  6. +22
    -18
      res/icons/noun_1084369_cc.svg
  7. +47
    -0
      res/icons/noun_1240789_cc.svg
  8. +71
    -0
      res/icons/noun_1343811_cc.svg
  9. +71
    -0
      res/icons/noun_1343816_cc.svg
  10. +56
    -0
      res/icons/noun_146097_cc.svg
  11. +57
    -0
      res/icons/noun_1745061_cc.svg
  12. +62
    -0
      res/icons/noun_305536_cc.svg
  13. +47
    -0
      res/icons/noun_31859_cc.svg
  14. +14
    -1
      src/app/ModuleWidget.cpp
  15. +3
    -0
      src/app/RackWidget.cpp
  16. +61
    -55
      src/app/Toolbar.cpp
  17. +6
    -6
      src/engine.cpp
  18. +2
    -3
      src/ui/Tooltip.cpp

+ 0
- 58
res/icons/030-feed.svg View File

@@ -1,58 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Generated by IcoMoon.io -->

<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"
version="1.1"
width="16"
height="16"
viewBox="0 0 16 16"
id="svg846"
sodipodi:docname="030-feed.svg"
inkscape:version="0.92.2 2405546, 2018-03-11">
<metadata
id="metadata852">
<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>
<defs
id="defs850" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1600"
inkscape:window-height="900"
id="namedview848"
showgrid="false"
inkscape:zoom="43.5"
inkscape:cx="8.7586207"
inkscape:cy="8.045977"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="0"
inkscape:current-layer="svg846" />
<path
d="M 6.5,8 C 6.5,7.17125 7.17125,6.5 8,6.5 8.82875,6.5 9.5,7.17125 9.5,8 9.5,8.82875 8.82875,9.5 8,9.5 7.17125,9.5 6.5,8.82875 6.5,8 Z M 9.785,4.7015 C 10.955,5.336 11.75,6.575 11.75,8 c 0,1.425 -0.79425,2.664 -1.965,3.2985 0.51675,-0.822 0.84,-1.995 0.84,-3.2985 0,-1.3035 -0.32325,-2.4765 -0.84,-3.2985 z M 5.375,8 c 0,1.3035 0.32325,2.4765 0.84,3.2985 C 5.045,10.664 4.25,9.425 4.25,8 4.25,6.575 5.04425,5.336 6.215,4.7015 5.69825,5.5235 5.375,6.6965 5.375,8 Z m -2.25,0 c 0,2.0145 0.6375,3.82275 1.6485,5.0595 C 3.10625,11.99375 2,10.12625 2,8 2,5.87375 3.1055,4.00625 4.7735,2.9405 3.7625,4.17725 3.125,5.9855 3.125,8 Z M 11.2265,2.9405 C 12.89375,4.00625 14,5.87375 14,8 c 0,2.12625 -1.1055,3.99375 -2.7735,5.0595 1.011,-1.23675 1.6485,-3.045 1.6485,-5.0595 0,-2.0145 -0.6375,-3.82275 -1.6485,-5.0595 z"
id="path844"
style="fill:#b4b4b4;fill-opacity:1;stroke-width:0.75"
inkscape:connector-curvature="0" />
</svg>

+ 0
- 58
res/icons/037-file-empty.svg View File

@@ -1,58 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Generated by IcoMoon.io -->

<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"
version="1.1"
width="16"
height="16"
viewBox="0 0 16 16"
id="svg4"
sodipodi:docname="037-file-empty.svg"
inkscape:version="0.92.2 2405546, 2018-03-11">
<metadata
id="metadata10">
<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>
<defs
id="defs8" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1600"
inkscape:window-height="900"
id="namedview6"
showgrid="false"
inkscape:zoom="14.75"
inkscape:cx="4.5423729"
inkscape:cy="8.4745763"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="0"
inkscape:current-layer="svg4" />
<path
d="M 12.75575,4.68425 C 12.4955,4.3295 12.1325,3.914 11.73425,3.51575 11.336,3.1175 10.9205,2.7545 10.56575,2.49425 9.96125,2.051 9.668,2 9.5,2 H 3.6875 C 3.17075,2 2.75,2.42075 2.75,2.9375 v 10.125 C 2.75,13.57925 3.17075,14 3.6875,14 h 8.625 C 12.82925,14 13.25,13.57925 13.25,13.0625 V 5.75 c 0,-0.168 -0.051,-0.46125 -0.49425,-1.06575 z m -1.5525,-0.6375 c 0.36,0.36 0.642,0.684 0.8505,0.95325 h -1.8045 V 3.19625 c 0.26925,0.2085 0.594,0.4905 0.95325,0.8505 z M 12.5,13.0625 c 0,0.102 -0.0855,0.1875 -0.1875,0.1875 H 3.6875 C 3.58625,13.25 3.5,13.1645 3.5,13.0625 V 2.9375 C 3.5,2.83625 3.58625,2.75 3.6875,2.75 c 0,0 5.81175,0 5.8125,0 V 5.375 C 9.5,5.582 9.668,5.75 9.875,5.75 H 12.5 Z"
id="path2"
style="fill:#b4b4b4;fill-opacity:1;stroke-width:0.75"
inkscape:connector-curvature="0" />
</svg>

+ 0
- 58
res/icons/099-floppy-disk.svg View File

@@ -1,58 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Generated by IcoMoon.io -->

<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"
version="1.1"
width="16"
height="16"
viewBox="0 0 16 16"
id="svg24"
sodipodi:docname="099-floppy-disk.svg"
inkscape:version="0.92.2 2405546, 2018-03-11">
<metadata
id="metadata30">
<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>
<defs
id="defs28" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1600"
inkscape:window-height="882"
id="namedview26"
showgrid="false"
inkscape:zoom="14.75"
inkscape:cx="-3.5932203"
inkscape:cy="8"
inkscape:window-x="0"
inkscape:window-y="18"
inkscape:window-maximized="0"
inkscape:current-layer="svg24" />
<path
d="M 12.5,2 H 2 V 14 H 14 V 3.5 Z M 8,3.5 h 1.5 v 3 H 8 Z m 4.5,9 h -9 v -9 H 4.25 V 7.25 H 11 V 3.5 h 0.879 L 12.5,4.121 Z"
id="path22"
style="fill:#b4b4b4;fill-opacity:1;stroke-width:0.75"
inkscape:connector-curvature="0" />
</svg>

+ 0
- 58
res/icons/167-meter.svg View File

@@ -1,58 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Generated by IcoMoon.io -->

<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"
version="1.1"
width="16"
height="16"
viewBox="0 0 16 16"
id="svg34"
sodipodi:docname="167-meter.svg"
inkscape:version="0.92.2 2405546, 2018-03-11">
<metadata
id="metadata40">
<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>
<defs
id="defs38" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1600"
inkscape:window-height="882"
id="namedview36"
showgrid="false"
inkscape:zoom="14.75"
inkscape:cx="-0.27118644"
inkscape:cy="5.6949153"
inkscape:window-x="0"
inkscape:window-y="18"
inkscape:window-maximized="0"
inkscape:current-layer="svg34" />
<path
d="m 8,2.375 c 3.3135,0 6,2.6865 6,6 0,2.259 -1.24875,4.22625 -3.09375,5.25 H 5.09375 C 3.24875,12.60125 2,10.634 2,8.375 c 0,-3.3135 2.6865,-6 6,-6 z m 3.3975,9.3975 C 12.305,10.865 12.8045,9.65825 12.8045,8.375 H 11.75 v -0.75 h 0.99675 C 12.66425,7.09775 12.49625,6.59225 12.248,6.125 H 11 v -0.75 h 0.753 C 11.64275,5.237 11.5235,5.10425 11.39675,4.9775 10.85525,4.436 10.2065,4.03925 9.49925,3.80825 V 4.625 h -0.75 V 3.62825 c -0.246,-0.03825 -0.4965,-0.0585 -0.75,-0.0585 -0.2535,0 -0.504,0.0195 -0.75,0.0585 V 4.625 h -0.75 V 3.80825 C 5.792,4.04 5.14325,4.436 4.60175,4.9775 4.475,5.10425 4.3565,5.237 4.2455,5.375 h 0.753 v 0.75 H 3.7505 C 3.50225,6.59225 3.33425,7.09775 3.25175,7.625 H 4.2485 v 0.75 H 3.194 c 0,1.28325 0.4995,2.49 1.407,3.3975 0.12525,0.12525 0.25725,0.243 0.393,0.3525 h 2.2545 l 0.42825,-6 H 8.3195 l 0.42825,6 h 2.2545 c 0.1365,-0.1095 0.26775,-0.22725 0.393,-0.3525 z"
id="path32"
style="fill:#b4b4b4;fill-opacity:1;stroke-width:0.75"
inkscape:connector-curvature="0" />
</svg>

+ 11
- 2
res/icons/LICENSE.md View File

@@ -1,2 +1,11 @@
SVG icons in this directory are licensed under the CC BY 4.0 License by IcoMoon.io.
https://icomoon.io/
All icons are licensed under CC BY 3.0.
https://creativecommons.org/licenses/by/3.0/
https://thenounproject.com/

Paper by Madeleine Bennett from the Noun Project
Folder by Icon Solid from the Noun Project
Save by Landan Lloyd from the Noun Project
Cat by Nabilauzwa from the Noun Project
Stopwatch by Arthur Shlain from the Noun Project
Sound by Gregor Cresnar from the Noun Project
Refresh by un·delivered from the Noun Project

res/icons/049-folder-open.svg → res/icons/noun_1084369_cc.svg View File

@@ -1,6 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Generated by IcoMoon.io -->

<svg <svg
xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#" xmlns:cc="http://creativecommons.org/ns#"
@@ -9,26 +7,30 @@
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
data-name="Your Icon"
viewBox="0 0 16 16"
x="0px"
y="0px"
version="1.1" version="1.1"
id="svg53"
sodipodi:docname="noun_1084369_cc.svg"
width="16" width="16"
height="16" height="16"
viewBox="0 0 16 16"
id="svg14"
sodipodi:docname="049-folder-open.svg"
inkscape:version="0.92.2 2405546, 2018-03-11"> inkscape:version="0.92.2 2405546, 2018-03-11">
<metadata <metadata
id="metadata20">
id="metadata59">
<rdf:RDF> <rdf:RDF>
<cc:Work <cc:Work
rdf:about=""> rdf:about="">
<dc:format>image/svg+xml</dc:format> <dc:format>image/svg+xml</dc:format>
<dc:type <dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title>Cycles</dc:title>
</cc:Work> </cc:Work>
</rdf:RDF> </rdf:RDF>
</metadata> </metadata>
<defs <defs
id="defs18" />
id="defs57" />
<sodipodi:namedview <sodipodi:namedview
pagecolor="#ffffff" pagecolor="#ffffff"
bordercolor="#666666" bordercolor="#666666"
@@ -39,19 +41,21 @@
inkscape:pageopacity="0" inkscape:pageopacity="0"
inkscape:pageshadow="2" inkscape:pageshadow="2"
inkscape:window-width="1600" inkscape:window-width="1600"
inkscape:window-height="882"
id="namedview16"
inkscape:window-height="900"
id="namedview55"
showgrid="false" showgrid="false"
inkscape:zoom="14.75"
inkscape:cx="-1.6271186"
inkscape:cy="6.8474576"
inkscape:zoom="2.784"
inkscape:cx="27.43027"
inkscape:cy="86.426288"
inkscape:window-x="0" inkscape:window-x="0"
inkscape:window-y="18"
inkscape:window-y="0"
inkscape:window-maximized="0" inkscape:window-maximized="0"
inkscape:current-layer="svg14" />
inkscape:current-layer="svg53" />
<title
id="title45">Cycles</title>
<path <path
d="m 11.75,12.875 2.25,-6 H 4.25 l -2.25,6 z M 3.5,6.125 2,12.875 v -9.75 h 3.375 l 1.5,1.5 h 4.875 v 1.5 z"
id="path12"
style="fill:#b4b4b4;fill-opacity:1;stroke-width:0.75"
inkscape:connector-curvature="0" />
d="M 9.0117134,7.367368 11.174158,5.206575 a 4.1778634,4.1778634 0 1 0 0.728524,4.460353 h 1.90804 0.01652 q -0.0413,0.15033 -0.09416,0.297357 A 6,6 0 1 1 12.462704,3.919681 l 1.473568,-1.473568 v 4.921255 z"
id="path47"
inkscape:connector-curvature="0"
style="stroke-width:0.16519824;fill:#b4b4b4;fill-opacity:1" />
</svg> </svg>

+ 47
- 0
res/icons/noun_1240789_cc.svg View File

@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<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"
version="1.1"
x="0px"
y="0px"
viewBox="0 0 16 16"
xml:space="preserve"
id="svg9404"
sodipodi:docname="noun_1240789_cc.svg"
width="16"
height="16"
inkscape:version="0.92.2 2405546, 2018-03-11"><metadata
id="metadata9410"><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>111all</dc:title></cc:Work></rdf:RDF></metadata><defs
id="defs9408" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1600"
inkscape:window-height="900"
id="namedview9406"
showgrid="false"
inkscape:zoom="1.888"
inkscape:cx="50"
inkscape:cy="62.5"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="0"
inkscape:current-layer="svg9404" /><title
id="title9396">111all</title><path
d="M 9.324675,3.5188325 C 9.041322,3.1363055 8.517119,3.0654675 8.134593,3.3346525 7.978749,3.4479935 7.865407,3.6180055 7.822904,3.8021855 L 6.292798,9.5400835 5.159386,7.1457505 C 5.01771,6.8482295 4.720189,6.6640505 4.3943329,6.6640505 H 2 v 1.700118 H 3.8559622 L 5.754427,12.345278 c 0.141677,0.297521 0.439198,0.4817 0.765054,0.4817 h 0.07084 c 0.354191,-0.02833 0.651712,-0.283353 0.736718,-0.623377 l 1.671782,-6.2621005 1.530107,2.068477 c 0.155844,0.212515 0.410861,0.340023 0.680047,0.340023 H 14 v -1.700118 h -2.337662 z"
id="path9398"
inkscape:connector-curvature="0"
style="fill:#b4b4b4;fill-opacity:1;stroke-width:0.1416765" /></svg>

+ 71
- 0
res/icons/noun_1343811_cc.svg View File

@@ -0,0 +1,71 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<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"
viewBox="0 0 16 16"
version="1.1"
x="0px"
y="0px"
id="svg5499"
sodipodi:docname="noun_1343811_cc.svg"
width="16"
height="16"
inkscape:version="0.92.2 2405546, 2018-03-11">
<metadata
id="metadata5505">
<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>7.3</dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs5503" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1600"
inkscape:window-height="900"
id="namedview5501"
showgrid="false"
inkscape:zoom="1.888"
inkscape:cx="-36.334746"
inkscape:cy="62.5"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="0"
inkscape:current-layer="svg5499" />
<title
id="title5485">7.3</title>
<desc
id="desc5487">Created with Sketch.</desc>
<g
id="g5493"
transform="matrix(0.3,0,0,0.3,-7,-7)"
style="fill:#b4b4b4;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1">
<g
id="g5491"
style="fill:#b4b4b4;fill-opacity:1">
<path
d="m 42,31 v 10 0 c 0,0.552285 0.447715,1 1,1 h 14 v 0 c 0.552285,0 1,-0.447715 1,-1 v -10 0 c 0,-0.552285 0.447715,-1 1,-1 h 2.171573 v 0 c 0.530433,0 1.039141,0.210714 1.414213,0.585786 l 6.828428,6.828428 v 0 C 69.789286,37.789286 70,38.297994 70,38.828427 V 68 68 c 0,1.104569 -0.895431,2 -2,2 H 32 v 0 c -1.10457,0 -2,-0.895431 -2,-2 v -36 0 c 0,-1.10457 0.89543,-2 2,-2 h 9 v 0 c 0.552285,0 1,0.447715 1,1 z m 9,-1 h 2 v 0 c 0.552285,0 1,0.447715 1,1 v 6 0 c 0,0.552285 -0.447715,1 -1,1 h -2 v 0 c -0.552285,0 -1,-0.447715 -1,-1 v -6 0 c 0,-0.552285 0.447715,-1 1,-1 z m -8,26 v 0 0 c 0,3.865993 3.134007,7 7,7 v 0 0 c 3.865993,0 7,-3.134007 7,-7 v 0 0 c 0,-3.865993 -3.134007,-7 -7,-7 v 0 0 c -3.865993,0 -7,3.134007 -7,7 z"
id="path5489"
inkscape:connector-curvature="0"
style="fill:#b4b4b4;fill-opacity:1" />
</g>
</g>
</svg>

+ 71
- 0
res/icons/noun_1343816_cc.svg View File

@@ -0,0 +1,71 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<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"
viewBox="0 0 16 16"
version="1.1"
x="0px"
y="0px"
id="svg4854"
sodipodi:docname="noun_1343816_cc.svg"
width="16"
height="16"
inkscape:version="0.92.2 2405546, 2018-03-11">
<metadata
id="metadata4860">
<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>8.3</dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs4858" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1600"
inkscape:window-height="900"
id="namedview4856"
showgrid="false"
inkscape:zoom="1.888"
inkscape:cx="-36.334746"
inkscape:cy="62.5"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="0"
inkscape:current-layer="svg4854" />
<title
id="title4840">8.3</title>
<desc
id="desc4842">Created with Sketch.</desc>
<g
id="g4848"
transform="matrix(0.3,0,0,0.3,-7,-7)"
style="fill:#b4b4b4;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1">
<g
id="g4846"
style="fill:#b4b4b4;fill-opacity:1">
<path
d="m 42,31 v 10 0 c 0,0.552285 0.447715,1 1,1 h 14 v 0 c 0.552285,0 1,-0.447715 1,-1 v -10 0 c 0,-0.552285 0.447715,-1 1,-1 h 2.171573 v 0 c 0.530433,0 1.039141,0.210714 1.414213,0.585786 l 6.828428,6.828428 v 0 C 69.789286,37.789286 70,38.297994 70,38.828427 V 68 68 c 0,1.104569 -0.895431,2 -2,2 H 32 v 0 c -1.10457,0 -2,-0.895431 -2,-2 v -36 0 c 0,-1.10457 0.89543,-2 2,-2 h 9 v 0 c 0.552285,0 1,0.447715 1,1 z m 9,-1 h 2 v 0 c 0.552285,0 1,0.447715 1,1 v 6 0 c 0,0.552285 -0.447715,1 -1,1 h -2 v 0 c -0.552285,0 -1,-0.447715 -1,-1 v -6 0 c 0,-0.552285 0.447715,-1 1,-1 z"
id="path4844"
inkscape:connector-curvature="0"
style="fill:#b4b4b4;fill-opacity:1" />
</g>
</g>
</svg>

+ 56
- 0
res/icons/noun_146097_cc.svg View File

@@ -0,0 +1,56 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<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"
version="1.1"
x="0px"
y="0px"
viewBox="0 0 16 16"
enable-background="new 0 0 90 90"
xml:space="preserve"
id="svg12754"
sodipodi:docname="noun_146097_cc.svg"
width="16"
height="16"
inkscape:version="0.92.2 2405546, 2018-03-11"><metadata
id="metadata12760"><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><defs
id="defs12758" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1600"
inkscape:window-height="882"
id="namedview12756"
showgrid="false"
inkscape:zoom="2.0977778"
inkscape:cx="-32.701271"
inkscape:cy="56.25"
inkscape:window-x="0"
inkscape:window-y="18"
inkscape:window-maximized="0"
inkscape:current-layer="svg12754" /><path
stroke-miterlimit="10"
d="M 8.0000005,3.115294"
id="path12744"
style="fill:#b4b4b4;fill-opacity:1;stroke:#000000;stroke-width:0.14117648;stroke-miterlimit:10"
inkscape:connector-curvature="0" /><path
d="M 12.531765,13.195294 V 6.122353 l -3.4164705,0.01412 c -0.465883,-2e-6 -0.847059,-0.381179 -0.847059,-0.847061 V 2 H 4.1317645 C 3.7647065,2 3.4682355,2.296471 3.4682355,2.663529 V 13.195294 C 3.4682355,13.632941 3.8211765,14 4.2729415,14 h 7.4541175 c 0.437647,0 0.804705,-0.367059 0.804706,-0.804706 z"
id="path12746"
style="fill:#b4b4b4;fill-opacity:1;stroke-width:0.14117648"
inkscape:connector-curvature="0" /><path
d="m 8.8188235,2.042353 v 3.063529 c 0,0.254118 0.211765,0.465883 0.465883,0.465883 h 3.1905885 z"
id="path12748"
style="fill:#b4b4b4;fill-opacity:1;stroke-width:0.14117648"
inkscape:connector-curvature="0" /></svg>

+ 57
- 0
res/icons/noun_1745061_cc.svg View File

@@ -0,0 +1,57 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<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"
xml:space="preserve"
version="1.1"
style="clip-rule:evenodd;fill-rule:evenodd;image-rendering:optimizeQuality;shape-rendering:geometricPrecision;text-rendering:geometricPrecision"
viewBox="0 0 16 16"
x="0px"
y="0px"
id="svg3034"
sodipodi:docname="noun_1745061_cc.svg"
width="16"
height="16"
inkscape:version="0.92.2 2405546, 2018-03-11"><metadata
id="metadata3038"><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><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1600"
inkscape:window-height="900"
id="namedview3036"
showgrid="false"
inkscape:zoom="2.9385214"
inkscape:cx="24.568026"
inkscape:cy="49.947022"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="0"
inkscape:current-layer="svg3034" /><defs
id="defs3024"><style
type="text/css"
id="style3022">
.fil0 {fill:black}
</style></defs><g
id="g3028"
transform="matrix(0.04669261,0,0,0.04669261,2.6002034,1.9999996)"
style="fill:#b4b4b4;fill-opacity:1"><path
class="fil0"
d="M 57,228 C -2,177 107,127 84,71 71,41 32,31 8,52 -7,64 2,79 17,69 34,55 56,62 64,81 c 12,29 -36,75 -43,102 -8,27 12,74 49,74 h 74 c 0,-9 -4,-13 -12,-14 20,-18 23,-40 1,-67 24,20 25,51 10,66 7,4 8,10 9,15 h 29 c -3,-4 -6,-8 -11,-10 -3,-50 25,-65 34,-94 6,-23 -3,-47 -10,-67 11,-8 25,6 37,-16 -10,-16 -5,-38 -26,-44 -4,-10 1,-17 6,-26 -52,18 -60,31 -65,73 -8,56 -22,34 -61,63 -37,27 -29,57 -28,92 z"
id="path3026"
inkscape:connector-curvature="0"
style="fill:#b4b4b4;fill-opacity:1" /></g></svg>

+ 62
- 0
res/icons/noun_305536_cc.svg View File

@@ -0,0 +1,62 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<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"
version="1.1"
x="0px"
y="0px"
viewBox="0 0 16 16"
enable-background="new 0 0 100 100"
xml:space="preserve"
id="svg11502"
sodipodi:docname="noun_305536_cc.svg"
width="16"
height="16"
inkscape:version="0.92.2 2405546, 2018-03-11"><metadata
id="metadata11508"><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><defs
id="defs11506" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1600"
inkscape:window-height="882"
id="namedview11504"
showgrid="false"
inkscape:zoom="5.3400704"
inkscape:cx="46.20989"
inkscape:cy="9.786758"
inkscape:window-x="0"
inkscape:window-y="18"
inkscape:window-maximized="0"
inkscape:current-layer="svg11502" /><path
d="M 8.666667,4.04 V 3.333333 H 9.333333 V 2 H 6.666667 V 3.333333 H 7.333333 V 4.04 C 4.893333,4.373333 3,6.466667 3,9 c 0,2.76 2.24,5 5,5 2.76,0 5,-2.24 5,-5 C 13,6.466667 11.106667,4.373333 8.666667,4.04 Z M 8,12.666667 c -2.026667,0 -3.666667,-1.64 -3.666667,-3.666667 0,-2.026667 1.64,-3.666667 3.666667,-3.666667 2.026667,0 3.666667,1.64 3.666667,3.666667 0,2.026667 -1.64,3.666667 -3.666667,3.666667 z"
id="path11490"
inkscape:connector-curvature="0"
style="fill:#b4b4b4;fill-opacity:1;stroke-width:0.13333334" /><path
d="M 3.013333,4.08 3.96,5.013333 C 4.493333,4.466667 5.12,4.053333 5.826667,3.76 L 5.32,2.533333 c -0.866667,0.36 -1.653333,0.88 -2.306667,1.546667 z"
id="path11492"
inkscape:connector-curvature="0"
style="fill:#b4b4b4;fill-opacity:1;stroke-width:0.13333334" /><path
d="m 12.92,4.013333 c -0.653333,-0.64 -1.4,-1.133333 -2.24,-1.48 L 10.173333,3.76 c 0.68,0.28 1.293334,0.68 1.813334,1.2 z"
id="path11494"
inkscape:connector-curvature="0"
style="fill:#b4b4b4;fill-opacity:1;stroke-width:0.13333334" /><rect
x="-12.687092"
y="-0.70676142"
transform="rotate(-135.00405)"
width="1.3334148"
height="2.8268394"
id="rect11496"
style="fill:#b4b4b4;fill-opacity:1;stroke-width:0.13334148" /></svg>

+ 47
- 0
res/icons/noun_31859_cc.svg View File

@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<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"
version="1.1"
x="0px"
y="0px"
viewBox="0 0 16 16"
enable-background="new 0 0 512 512"
xml:space="preserve"
id="svg10862"
sodipodi:docname="noun_31859_cc.svg"
width="16"
height="16"
inkscape:version="0.92.2 2405546, 2018-03-11"><metadata
id="metadata10868"><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><defs
id="defs10866" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1600"
inkscape:window-height="882"
id="namedview10864"
showgrid="false"
inkscape:zoom="0.36875"
inkscape:cx="212.61017"
inkscape:cy="271.18644"
inkscape:window-x="0"
inkscape:window-y="18"
inkscape:window-maximized="0"
inkscape:current-layer="svg10862" /><path
d="m 13.957459,7.579605 -1.650881,4.54537 H 3.2451096 l 1.7050678,-4.54757 c 0.1450069,-0.38599 0.6013088,-0.7024 1.0136657,-0.7024 h 7.4999549 c 0.412357,0 0.635012,0.31713 0.493661,0.7046 z m -11.2301744,3.79099 1.5212251,-4.05614 c 0.2534282,-0.67823 0.990955,-1.18944 1.7153334,-1.18944 h 6.5360939 c 0,-0.41456 -0.335459,-0.75 -0.749996,-0.75 H 6.4999727 L 5.7499772,3.875025 H 2.7499954 c -0.41456,0 -0.7499955,0.33546 -0.7499955,0.75 v 5.99996 c 0,0.4065 0.3237168,0.73242 0.7272847,0.74561 z"
id="path10856"
inkscape:connector-curvature="0"
style="fill:#b4b4b4;fill-opacity:1;stroke-width:0.02343736" /></svg>

+ 14
- 1
src/app/ModuleWidget.cpp View File

@@ -190,7 +190,20 @@ void ModuleWidget::draw(NVGcontext *vg) {
Widget::draw(vg); Widget::draw(vg);


// CPU meter // CPU meter
if (gCpuMeters && module) {
if (module && gCpuMeters) {
nvgBeginPath(vg);
nvgRect(vg,
0, box.size.y - 20,
55, 20);
nvgFillColor(vg, nvgRGBAf(0, 0, 0, 0.5));
nvgFill(vg);

std::string cpuText = stringf("%.0f mS", module->cpuTime * 1000.f);
nvgFontFaceId(vg, gGuiFont->handle);
nvgFontSize(vg, 12);
nvgFillColor(vg, nvgRGBf(1, 1, 1));
nvgText(vg, 10.0, box.size.y - 6.0, cpuText.c_str(), NULL);

float p = clamp(module->cpuTime, 0.f, 1.f); float p = clamp(module->cpuTime, 0.f, 1.f);
nvgBeginPath(vg); nvgBeginPath(vg);
nvgRect(vg, nvgRect(vg,


+ 3
- 0
src/app/RackWidget.cpp View File

@@ -165,6 +165,9 @@ void RackWidget::revert() {
} }


void RackWidget::disconnect() { void RackWidget::disconnect() {
if (!osdialog_message(OSDIALOG_WARNING, OSDIALOG_OK_CANCEL, "Clear all patch cables?"))
return;

for (Widget *w : moduleContainer->children) { for (Widget *w : moduleContainer->children) {
ModuleWidget *moduleWidget = dynamic_cast<ModuleWidget*>(w); ModuleWidget *moduleWidget = dynamic_cast<ModuleWidget*>(w);
assert(moduleWidget); assert(moduleWidget);


+ 61
- 55
src/app/Toolbar.cpp View File

@@ -8,24 +8,31 @@ namespace rack {




struct TooltipIconButton : IconButton { struct TooltipIconButton : IconButton {
Tooltip *tooltip = NULL;
std::string tooltipText; std::string tooltipText;
void onMouseEnter(EventMouseEnter &e) override { void onMouseEnter(EventMouseEnter &e) override {
TooltipOverlay *overlay = new TooltipOverlay();
Tooltip *tooltip = new Tooltip();
tooltip->box.pos = getAbsoluteOffset(Vec(0, BND_WIDGET_HEIGHT));
tooltip->text = tooltipText;
overlay->addChild(tooltip);
gScene->setOverlay(overlay);
if (!tooltip) {
tooltip = new Tooltip();
tooltip->box.pos = getAbsoluteOffset(Vec(0, BND_WIDGET_HEIGHT));
tooltip->text = tooltipText;
gScene->addChild(tooltip);
}
IconButton::onMouseEnter(e);
} }
void onMouseLeave(EventMouseLeave &e) override { void onMouseLeave(EventMouseLeave &e) override {
gScene->setOverlay(NULL);
if (tooltip) {
gScene->removeChild(tooltip);
delete tooltip;
tooltip = NULL;
}
IconButton::onMouseLeave(e);
} }
}; };


struct NewButton : TooltipIconButton { struct NewButton : TooltipIconButton {
NewButton() { NewButton() {
setSVG(SVG::load(assetGlobal("res/icons/037-file-empty.svg")));
tooltipText = "New patch (" WINDOW_MOD_KEY_NAME "+N)";
setSVG(SVG::load(assetGlobal("res/icons/noun_146097_cc.svg")));
tooltipText = "New (" WINDOW_MOD_KEY_NAME "+N)";
} }
void onAction(EventAction &e) override { void onAction(EventAction &e) override {
gRackWidget->reset(); gRackWidget->reset();
@@ -34,8 +41,8 @@ struct NewButton : TooltipIconButton {


struct OpenButton : TooltipIconButton { struct OpenButton : TooltipIconButton {
OpenButton() { OpenButton() {
setSVG(SVG::load(assetGlobal("res/icons/049-folder-open.svg")));
tooltipText = "Open patch (" WINDOW_MOD_KEY_NAME "+O)";
setSVG(SVG::load(assetGlobal("res/icons/noun_31859_cc.svg")));
tooltipText = "Open (" WINDOW_MOD_KEY_NAME "+O)";
} }
void onAction(EventAction &e) override { void onAction(EventAction &e) override {
gRackWidget->openDialog(); gRackWidget->openDialog();
@@ -44,18 +51,48 @@ struct OpenButton : TooltipIconButton {


struct SaveButton : TooltipIconButton { struct SaveButton : TooltipIconButton {
SaveButton() { SaveButton() {
setSVG(SVG::load(assetGlobal("res/icons/099-floppy-disk.svg")));
tooltipText = "Save patch (" WINDOW_MOD_KEY_NAME "+S)";
setSVG(SVG::load(assetGlobal("res/icons/noun_1343816_cc.svg")));
tooltipText = "Save (" WINDOW_MOD_KEY_NAME "+S)";
} }
void onAction(EventAction &e) override { void onAction(EventAction &e) override {
gRackWidget->saveDialog(); gRackWidget->saveDialog();
} }
}; };


struct SaveAsButton : TooltipIconButton {
SaveAsButton() {
setSVG(SVG::load(assetGlobal("res/icons/noun_1343811_cc.svg")));
tooltipText = "Save as (" WINDOW_MOD_KEY_NAME "+Shift+S)";
}
void onAction(EventAction &e) override {
gRackWidget->saveAsDialog();
}
};

struct RevertButton : TooltipIconButton {
RevertButton() {
setSVG(SVG::load(assetGlobal("res/icons/noun_1084369_cc.svg")));
tooltipText = "Revert";
}
void onAction(EventAction &e) override {
gRackWidget->revert();
}
};

struct DisconnectCablesButton : TooltipIconButton {
DisconnectCablesButton() {
setSVG(SVG::load(assetGlobal("res/icons/noun_1745061_cc.svg")));
tooltipText = "Disconnect cables";
}
void onAction(EventAction &e) override {
gRackWidget->disconnect();
}
};

struct MeterButton : TooltipIconButton { struct MeterButton : TooltipIconButton {
MeterButton() { MeterButton() {
setSVG(SVG::load(assetGlobal("res/icons/167-meter.svg")));
tooltipText = "Toggle CPU meter\nSee manual for mV definition";
setSVG(SVG::load(assetGlobal("res/icons/noun_305536_cc.svg")));
tooltipText = "Toggle power meter (see manual for explanation)";
} }
void onAction(EventAction &e) override { void onAction(EventAction &e) override {
gCpuMeters ^= true; gCpuMeters ^= true;
@@ -78,7 +115,7 @@ struct SampleRateItem : MenuItem {


struct SampleRateButton : TooltipIconButton { struct SampleRateButton : TooltipIconButton {
SampleRateButton() { SampleRateButton() {
setSVG(SVG::load(assetGlobal("res/icons/030-feed.svg")));
setSVG(SVG::load(assetGlobal("res/icons/noun_1240789_cc.svg")));
tooltipText = "Internal sample rate"; tooltipText = "Internal sample rate";
} }
void onAction(EventAction &e) override { void onAction(EventAction &e) override {
@@ -86,6 +123,8 @@ struct SampleRateButton : TooltipIconButton {
menu->box.pos = getAbsoluteOffset(Vec(0, box.size.y)); menu->box.pos = getAbsoluteOffset(Vec(0, box.size.y));
menu->box.size.x = box.size.x; menu->box.size.x = box.size.x;


menu->addChild(MenuLabel::create("Internal sample rate"));

EnginePauseItem *pauseItem = new EnginePauseItem(); EnginePauseItem *pauseItem = new EnginePauseItem();
pauseItem->text = gPaused ? "Resume engine" : "Pause engine"; pauseItem->text = gPaused ? "Resume engine" : "Pause engine";
menu->addChild(pauseItem); menu->addChild(pauseItem);
@@ -103,38 +142,6 @@ struct SampleRateButton : TooltipIconButton {






struct DisconnectItem : MenuItem {
void onAction(EventAction &e) override {
gRackWidget->disconnect();
}
};

struct SaveAsItem : MenuItem {
void onAction(EventAction &e) override {
gRackWidget->saveAsDialog();
}
};

struct RevertItem : MenuItem {
void onAction(EventAction &e) override {
gRackWidget->revert();
}
};

struct FileChoice : ChoiceButton {
void onAction(EventAction &e) override {
Menu *menu = gScene->createMenu();
menu->box.pos = getAbsoluteOffset(Vec(0, box.size.y));
menu->box.size.x = box.size.x;

menu->addChild(MenuItem::create<DisconnectItem>("Disconnect cables"));
menu->addChild(MenuItem::create<SaveAsItem>("Save as", WINDOW_MOD_KEY_NAME "+Shift+S"));
menu->addChild(MenuItem::create<RevertItem>("Revert"));
}
};



Toolbar::Toolbar() { Toolbar::Toolbar() {
box.size.y = BND_WIDGET_HEIGHT + 2*5; box.size.y = BND_WIDGET_HEIGHT + 2*5;


@@ -146,13 +153,9 @@ Toolbar::Toolbar() {
layout->addChild(new NewButton()); layout->addChild(new NewButton());
layout->addChild(new OpenButton()); layout->addChild(new OpenButton());
layout->addChild(new SaveButton()); layout->addChild(new SaveButton());
layout->addChild(new SampleRateButton());
layout->addChild(new MeterButton());

ChoiceButton *fileChoice = new FileChoice();
fileChoice->box.size.x = 100;
fileChoice->text = "File";
layout->addChild(fileChoice);
layout->addChild(new SaveAsButton());
layout->addChild(new RevertButton());
layout->addChild(new DisconnectCablesButton());


wireOpacitySlider = new Slider(); wireOpacitySlider = new Slider();
wireOpacitySlider->box.size.x = 150; wireOpacitySlider->box.size.x = 150;
@@ -171,6 +174,9 @@ Toolbar::Toolbar() {
wireTensionSlider->setDefaultValue(0.5); wireTensionSlider->setDefaultValue(0.5);
layout->addChild(wireTensionSlider); layout->addChild(wireTensionSlider);


layout->addChild(new SampleRateButton());
layout->addChild(new MeterButton());

struct ZoomSlider : Slider { struct ZoomSlider : Slider {
void onAction(EventAction &e) override { void onAction(EventAction &e) override {
Slider::onAction(e); Slider::onAction(e);


+ 6
- 6
src/engine.cpp View File

@@ -20,7 +20,7 @@ std::vector<Wire*> gWires;
bool gCpuMeters = false; bool gCpuMeters = false;


static bool running = false; static bool running = false;
static float sampleRate;
static float sampleRate = 44100.f;
static float sampleTime; static float sampleTime;


static std::mutex mutex; static std::mutex mutex;
@@ -92,17 +92,17 @@ static void engineStep() {
std::chrono::high_resolution_clock::time_point startTime; std::chrono::high_resolution_clock::time_point startTime;
if (gCpuMeters) { if (gCpuMeters) {
startTime = std::chrono::high_resolution_clock::now(); startTime = std::chrono::high_resolution_clock::now();
}


module->step();
module->step();


if (gCpuMeters) {
auto stopTime = std::chrono::high_resolution_clock::now(); auto stopTime = std::chrono::high_resolution_clock::now();
float cpuTime = std::chrono::duration<float>(stopTime - startTime).count() * sampleRate; float cpuTime = std::chrono::duration<float>(stopTime - startTime).count() * sampleRate;
module->cpuTime += (cpuTime - module->cpuTime) * sampleTime * 10.f;
module->cpuTime += (cpuTime - module->cpuTime) * sampleTime / 0.25f;
}
else {
module->step();
} }


// TODO skip this step when plug lights are disabled
// Step ports // Step ports
for (Input &input : module->inputs) { for (Input &input : module->inputs) {
if (input.active) { if (input.active) {


+ 2
- 3
src/ui/Tooltip.cpp View File

@@ -10,9 +10,8 @@ Tooltip::Tooltip() {


void Tooltip::draw(NVGcontext *vg) { void Tooltip::draw(NVGcontext *vg) {
// Wrap size to contents // Wrap size to contents
float bounds[4];
nvgTextBounds(gVg, 0.0, 0.0, text.c_str(), NULL, bounds);
box.size = Vec(bounds[2], BND_WIDGET_HEIGHT);
box.size.x = bndLabelWidth(vg, -1, text.c_str());
box.size.y = bndLabelHeight(vg, -1, text.c_str(), INFINITY);


bndTooltipBackground(vg, 0.0, 0.0, box.size.x, box.size.y); bndTooltipBackground(vg, 0.0, 0.0, box.size.x, box.size.y);
bndMenuLabel(vg, 0.0, 0.0, box.size.x, box.size.y, -1, text.c_str()); bndMenuLabel(vg, 0.0, 0.0, box.size.x, box.size.y, -1, text.c_str());


Loading…
Cancel
Save