From d7f3c12d81bb256f12d320f978ebc6bf90b704a1 Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Thu, 26 Dec 2019 04:51:56 -0500 Subject: [PATCH] Use createPanel() --- src/8vert.cpp | 2 +- src/ADSR.cpp | 2 +- src/Delay.cpp | 2 +- src/LFO.cpp | 4 ++-- src/Merge.cpp | 2 +- src/MidSide.cpp | 2 +- src/Mutes.cpp | 2 +- src/Noise.cpp | 2 +- src/Octave.cpp | 2 +- src/Pulses.cpp | 2 +- src/Quantizer.cpp | 2 +- src/Random.cpp | 2 +- src/SEQ3.cpp | 2 +- src/Scope.cpp | 2 +- src/SequentialSwitch.cpp | 4 ++-- src/Split.cpp | 2 +- src/Sum.cpp | 2 +- src/Unity.cpp | 2 +- src/VCA.cpp | 4 ++-- src/VCF.cpp | 2 +- src/VCMixer.cpp | 2 +- src/VCO.cpp | 4 ++-- src/Viz.cpp | 2 +- 23 files changed, 27 insertions(+), 27 deletions(-) diff --git a/src/8vert.cpp b/src/8vert.cpp index c340987..1dadb09 100644 --- a/src/8vert.cpp +++ b/src/8vert.cpp @@ -58,7 +58,7 @@ struct _8vert : Module { struct _8vertWidget : ModuleWidget { _8vertWidget(_8vert* module) { setModule(module); - setPanel(APP->window->loadSvg(asset::plugin(pluginInstance, "res/8vert.svg"))); + setPanel(createPanel(asset::plugin(pluginInstance, "res/8vert.svg"))); addChild(createWidget(Vec(15, 0))); addChild(createWidget(Vec(box.size.x - 30, 0))); diff --git a/src/ADSR.cpp b/src/ADSR.cpp index 143f59c..99d9ce8 100644 --- a/src/ADSR.cpp +++ b/src/ADSR.cpp @@ -158,7 +158,7 @@ struct ADSR : Module { struct ADSRWidget : ModuleWidget { ADSRWidget(ADSR* module) { setModule(module); - setPanel(APP->window->loadSvg(asset::plugin(pluginInstance, "res/ADSR.svg"))); + setPanel(createPanel(asset::plugin(pluginInstance, "res/ADSR.svg"))); addChild(createWidget(Vec(15, 0))); addChild(createWidget(Vec(box.size.x - 30, 0))); diff --git a/src/Delay.cpp b/src/Delay.cpp index 9cd2928..21e5c09 100644 --- a/src/Delay.cpp +++ b/src/Delay.cpp @@ -127,7 +127,7 @@ struct Delay : Module { struct DelayWidget : ModuleWidget { DelayWidget(Delay* module) { setModule(module); - setPanel(APP->window->loadSvg(asset::plugin(pluginInstance, "res/Delay.svg"))); + setPanel(createPanel(asset::plugin(pluginInstance, "res/Delay.svg"))); addChild(createWidget(Vec(15, 0))); addChild(createWidget(Vec(box.size.x - 30, 0))); diff --git a/src/LFO.cpp b/src/LFO.cpp index f45d38a..1f4dd71 100644 --- a/src/LFO.cpp +++ b/src/LFO.cpp @@ -202,7 +202,7 @@ struct LFO : Module { struct LFOWidget : ModuleWidget { LFOWidget(LFO* module) { setModule(module); - setPanel(APP->window->loadSvg(asset::plugin(pluginInstance, "res/LFO-1.svg"))); + setPanel(createPanel(asset::plugin(pluginInstance, "res/LFO-1.svg"))); addChild(createWidget(Vec(15, 0))); addChild(createWidget(Vec(box.size.x - 30, 0))); @@ -331,7 +331,7 @@ struct LFO2 : Module { struct LFO2Widget : ModuleWidget { LFO2Widget(LFO2* module) { setModule(module); - setPanel(APP->window->loadSvg(asset::plugin(pluginInstance, "res/LFO-2.svg"))); + setPanel(createPanel(asset::plugin(pluginInstance, "res/LFO-2.svg"))); addChild(createWidget(Vec(15, 0))); addChild(createWidget(Vec(box.size.x - 30, 0))); diff --git a/src/Merge.cpp b/src/Merge.cpp index 567a68a..62ebe56 100644 --- a/src/Merge.cpp +++ b/src/Merge.cpp @@ -104,7 +104,7 @@ struct MergeChannelsItem : MenuItem { struct MergeWidget : ModuleWidget { MergeWidget(Merge* module) { setModule(module); - setPanel(APP->window->loadSvg(asset::plugin(pluginInstance, "res/Merge.svg"))); + setPanel(createPanel(asset::plugin(pluginInstance, "res/Merge.svg"))); addChild(createWidget(Vec(RACK_GRID_WIDTH, 0))); addChild(createWidget(Vec(box.size.x - 2 * RACK_GRID_WIDTH, 0))); diff --git a/src/MidSide.cpp b/src/MidSide.cpp index 143bd00..86e76bc 100644 --- a/src/MidSide.cpp +++ b/src/MidSide.cpp @@ -90,7 +90,7 @@ struct MidSide : Module { struct MidSideWidget : ModuleWidget { MidSideWidget(MidSide* module) { setModule(module); - setPanel(APP->window->loadSvg(asset::plugin(pluginInstance, "res/MidSide.svg"))); + setPanel(createPanel(asset::plugin(pluginInstance, "res/MidSide.svg"))); addChild(createWidget(Vec(RACK_GRID_WIDTH, 0))); addChild(createWidget(Vec(box.size.x - 2 * RACK_GRID_WIDTH, 0))); diff --git a/src/Mutes.cpp b/src/Mutes.cpp index bdd4930..12f1ffd 100644 --- a/src/Mutes.cpp +++ b/src/Mutes.cpp @@ -104,7 +104,7 @@ struct Mutes : Module { struct MutesWidget : ModuleWidget { MutesWidget(Mutes* module) { setModule(module); - setPanel(APP->window->loadSvg(asset::plugin(pluginInstance, "res/Mutes.svg"))); + setPanel(createPanel(asset::plugin(pluginInstance, "res/Mutes.svg"))); addChild(createWidget(Vec(15, 0))); addChild(createWidget(Vec(box.size.x - 30, 0))); diff --git a/src/Noise.cpp b/src/Noise.cpp index c576940..5cab08a 100644 --- a/src/Noise.cpp +++ b/src/Noise.cpp @@ -179,7 +179,7 @@ struct Noise : Module { struct NoiseWidget : ModuleWidget { NoiseWidget(Noise* module) { setModule(module); - setPanel(APP->window->loadSvg(asset::plugin(pluginInstance, "res/Noise.svg"))); + setPanel(createPanel(asset::plugin(pluginInstance, "res/Noise.svg"))); addChild(createWidget(Vec(RACK_GRID_WIDTH, 0))); addChild(createWidget(Vec(box.size.x - 2 * RACK_GRID_WIDTH, 0))); diff --git a/src/Octave.cpp b/src/Octave.cpp index 6049f09..9ddc93f 100644 --- a/src/Octave.cpp +++ b/src/Octave.cpp @@ -155,7 +155,7 @@ inline void OctaveButton::onDragEnter(const event::DragEnter& e) { struct OctaveWidget : ModuleWidget { OctaveWidget(Octave* module) { setModule(module); - setPanel(APP->window->loadSvg(asset::plugin(pluginInstance, "res/Octave.svg"))); + setPanel(createPanel(asset::plugin(pluginInstance, "res/Octave.svg"))); addChild(createWidget(Vec(RACK_GRID_WIDTH, 0))); addChild(createWidget(Vec(RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); diff --git a/src/Pulses.cpp b/src/Pulses.cpp index 3408b51..f27fd1e 100644 --- a/src/Pulses.cpp +++ b/src/Pulses.cpp @@ -49,7 +49,7 @@ struct Pulses : Module { struct PulsesWidget : ModuleWidget { PulsesWidget(Pulses* module) { setModule(module); - setPanel(APP->window->loadSvg(asset::plugin(pluginInstance, "res/Pulses.svg"))); + setPanel(createPanel(asset::plugin(pluginInstance, "res/Pulses.svg"))); addChild(createWidget(Vec(RACK_GRID_WIDTH, 0))); addChild(createWidget(Vec(box.size.x - 2 * RACK_GRID_WIDTH, 0))); diff --git a/src/Quantizer.cpp b/src/Quantizer.cpp index 0261efe..bafb9b4 100644 --- a/src/Quantizer.cpp +++ b/src/Quantizer.cpp @@ -193,7 +193,7 @@ struct QuantizerDisplay : OpaqueWidget { struct QuantizerWidget : ModuleWidget { QuantizerWidget(Quantizer* module) { setModule(module); - setPanel(APP->window->loadSvg(asset::plugin(pluginInstance, "res/Quantizer.svg"))); + setPanel(createPanel(asset::plugin(pluginInstance, "res/Quantizer.svg"))); addChild(createWidget(Vec(RACK_GRID_WIDTH, 0))); addChild(createWidget(Vec(RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); diff --git a/src/Random.cpp b/src/Random.cpp index f8e6385..b6d2667 100644 --- a/src/Random.cpp +++ b/src/Random.cpp @@ -185,7 +185,7 @@ struct Random : Module { struct RandomWidget : ModuleWidget { RandomWidget(Random* module) { setModule(module); - setPanel(APP->window->loadSvg(asset::plugin(pluginInstance, "res/Random.svg"))); + setPanel(createPanel(asset::plugin(pluginInstance, "res/Random.svg"))); addChild(createWidget(Vec(RACK_GRID_WIDTH, 0))); addChild(createWidget(Vec(box.size.x - 2 * RACK_GRID_WIDTH, 0))); diff --git a/src/SEQ3.cpp b/src/SEQ3.cpp index 07fd035..c9ee297 100644 --- a/src/SEQ3.cpp +++ b/src/SEQ3.cpp @@ -184,7 +184,7 @@ struct SEQ3 : Module { struct SEQ3Widget : ModuleWidget { SEQ3Widget(SEQ3* module) { setModule(module); - setPanel(APP->window->loadSvg(asset::plugin(pluginInstance, "res/SEQ3.svg"))); + setPanel(createPanel(asset::plugin(pluginInstance, "res/SEQ3.svg"))); addChild(createWidget(Vec(15, 0))); addChild(createWidget(Vec(box.size.x - 30, 0))); diff --git a/src/Scope.cpp b/src/Scope.cpp index dd74ab1..9961251 100644 --- a/src/Scope.cpp +++ b/src/Scope.cpp @@ -346,7 +346,7 @@ struct ScopeDisplay : TransparentWidget { struct ScopeWidget : ModuleWidget { ScopeWidget(Scope* module) { setModule(module); - setPanel(APP->window->loadSvg(asset::plugin(pluginInstance, "res/Scope.svg"))); + setPanel(createPanel(asset::plugin(pluginInstance, "res/Scope.svg"))); addChild(createWidget(Vec(15, 0))); addChild(createWidget(Vec(box.size.x - 30, 0))); diff --git a/src/SequentialSwitch.cpp b/src/SequentialSwitch.cpp index 34d5444..29fb1df 100644 --- a/src/SequentialSwitch.cpp +++ b/src/SequentialSwitch.cpp @@ -125,7 +125,7 @@ struct SequentialSwitch1Widget : ModuleWidget { SequentialSwitch1Widget(TSequentialSwitch* module) { setModule(module); - setPanel(APP->window->loadSvg(asset::plugin(pluginInstance, "res/SequentialSwitch1.svg"))); + setPanel(createPanel(asset::plugin(pluginInstance, "res/SequentialSwitch1.svg"))); addChild(createWidget(Vec(RACK_GRID_WIDTH, 0))); addChild(createWidget(Vec(RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); @@ -157,7 +157,7 @@ struct SequentialSwitch2Widget : ModuleWidget { SequentialSwitch2Widget(TSequentialSwitch* module) { setModule(module); - setPanel(APP->window->loadSvg(asset::plugin(pluginInstance, "res/SequentialSwitch2.svg"))); + setPanel(createPanel(asset::plugin(pluginInstance, "res/SequentialSwitch2.svg"))); addChild(createWidget(Vec(RACK_GRID_WIDTH, 0))); addChild(createWidget(Vec(RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); diff --git a/src/Split.cpp b/src/Split.cpp index 79f54a7..c2e95dd 100644 --- a/src/Split.cpp +++ b/src/Split.cpp @@ -50,7 +50,7 @@ struct Split : Module { struct SplitWidget : ModuleWidget { SplitWidget(Split* module) { setModule(module); - setPanel(APP->window->loadSvg(asset::plugin(pluginInstance, "res/Split.svg"))); + setPanel(createPanel(asset::plugin(pluginInstance, "res/Split.svg"))); addChild(createWidget(Vec(RACK_GRID_WIDTH, 0))); addChild(createWidget(Vec(box.size.x - 2 * RACK_GRID_WIDTH, 0))); diff --git a/src/Sum.cpp b/src/Sum.cpp index 396155c..7d01c11 100644 --- a/src/Sum.cpp +++ b/src/Sum.cpp @@ -63,7 +63,7 @@ struct Sum : Module { struct SumWidget : ModuleWidget { SumWidget(Sum* module) { setModule(module); - setPanel(APP->window->loadSvg(asset::plugin(pluginInstance, "res/Sum.svg"))); + setPanel(createPanel(asset::plugin(pluginInstance, "res/Sum.svg"))); addChild(createWidget(Vec(RACK_GRID_WIDTH, 0))); addChild(createWidget(Vec(box.size.x - 2 * RACK_GRID_WIDTH, 0))); diff --git a/src/Unity.cpp b/src/Unity.cpp index da7de14..f88ca6f 100644 --- a/src/Unity.cpp +++ b/src/Unity.cpp @@ -121,7 +121,7 @@ struct UnityMergeItem : MenuItem { struct UnityWidget : ModuleWidget { UnityWidget(Unity* module) { setModule(module); - setPanel(APP->window->loadSvg(asset::plugin(pluginInstance, "res/Unity.svg"))); + setPanel(createPanel(asset::plugin(pluginInstance, "res/Unity.svg"))); addChild(createWidget(Vec(15, 0))); addChild(createWidget(Vec(box.size.x - 30, 0))); diff --git a/src/VCA.cpp b/src/VCA.cpp index d891c7b..cc75e8c 100644 --- a/src/VCA.cpp +++ b/src/VCA.cpp @@ -107,7 +107,7 @@ struct VCA : Module { struct VCAWidget : ModuleWidget { VCAWidget(VCA* module) { setModule(module); - setPanel(APP->window->loadSvg(asset::plugin(pluginInstance, "res/VCA.svg"))); + setPanel(createPanel(asset::plugin(pluginInstance, "res/VCA.svg"))); addChild(createWidget(Vec(RACK_GRID_WIDTH, 0))); addChild(createWidget(Vec(box.size.x - 2 * RACK_GRID_WIDTH, 0))); @@ -256,7 +256,7 @@ struct VCA_1VUKnob : SliderKnob { struct VCA_1Widget : ModuleWidget { VCA_1Widget(VCA_1* module) { setModule(module); - setPanel(APP->window->loadSvg(asset::plugin(pluginInstance, "res/VCA-1.svg"))); + setPanel(createPanel(asset::plugin(pluginInstance, "res/VCA-1.svg"))); addChild(createWidget(Vec(RACK_GRID_WIDTH, 0))); addChild(createWidget(Vec(box.size.x - 2 * RACK_GRID_WIDTH, 0))); diff --git a/src/VCF.cpp b/src/VCF.cpp index 3e3095e..f8a0eb0 100644 --- a/src/VCF.cpp +++ b/src/VCF.cpp @@ -196,7 +196,7 @@ struct VCF : Module { struct VCFWidget : ModuleWidget { VCFWidget(VCF* module) { setModule(module); - setPanel(APP->window->loadSvg(asset::plugin(pluginInstance, "res/VCF.svg"))); + setPanel(createPanel(asset::plugin(pluginInstance, "res/VCF.svg"))); addChild(createWidget(Vec(15, 0))); addChild(createWidget(Vec(box.size.x - 30, 0))); diff --git a/src/VCMixer.cpp b/src/VCMixer.cpp index fac79e2..95c6148 100644 --- a/src/VCMixer.cpp +++ b/src/VCMixer.cpp @@ -133,7 +133,7 @@ struct VCMixer : Module { struct VCMixerWidget : ModuleWidget { VCMixerWidget(VCMixer* module) { setModule(module); - setPanel(APP->window->loadSvg(asset::plugin(pluginInstance, "res/VCMixer.svg"))); + setPanel(createPanel(asset::plugin(pluginInstance, "res/VCMixer.svg"))); addChild(createWidget(Vec(RACK_GRID_WIDTH, 0))); addChild(createWidget(Vec(box.size.x - 2 * RACK_GRID_WIDTH, 0))); diff --git a/src/VCO.cpp b/src/VCO.cpp index 6ec133f..bfece86 100644 --- a/src/VCO.cpp +++ b/src/VCO.cpp @@ -360,7 +360,7 @@ struct VCO : Module { struct VCOWidget : ModuleWidget { VCOWidget(VCO* module) { setModule(module); - setPanel(APP->window->loadSvg(asset::plugin(pluginInstance, "res/VCO-1.svg"))); + setPanel(createPanel(asset::plugin(pluginInstance, "res/VCO-1.svg"))); addChild(createWidget(Vec(15, 0))); addChild(createWidget(Vec(box.size.x - 30, 0))); @@ -493,7 +493,7 @@ struct VCO2 : Module { struct VCO2Widget : ModuleWidget { VCO2Widget(VCO2* module) { setModule(module); - setPanel(APP->window->loadSvg(asset::plugin(pluginInstance, "res/VCO-2.svg"))); + setPanel(createPanel(asset::plugin(pluginInstance, "res/VCO-2.svg"))); addChild(createWidget(Vec(15, 0))); addChild(createWidget(Vec(box.size.x - 30, 0))); diff --git a/src/Viz.cpp b/src/Viz.cpp index 56a1081..c957b27 100644 --- a/src/Viz.cpp +++ b/src/Viz.cpp @@ -71,7 +71,7 @@ struct VizDisplay : Widget { struct VizWidget : ModuleWidget { VizWidget(Viz* module) { setModule(module); - setPanel(APP->window->loadSvg(asset::plugin(pluginInstance, "res/Viz.svg"))); + setPanel(createPanel(asset::plugin(pluginInstance, "res/Viz.svg"))); addChild(createWidget(Vec(RACK_GRID_WIDTH, 0))); addChild(createWidget(Vec(box.size.x - 2 * RACK_GRID_WIDTH, 0)));