55// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
66// Constructor
77// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
8-
8+ constexpr float innerCorner = 0 . 8f ;
99PlasmaAudioProcessorEditor::PlasmaAudioProcessorEditor (PlasmaAudioProcessor& p)
1010 : AudioProcessorEditor(&p)
1111 , audioProcessor(p)
@@ -414,7 +414,7 @@ PlasmaAudioProcessorEditor::PlasmaAudioProcessorEditor(PlasmaAudioProcessor& p)
414414 highPassResonanceQualitySlider.setVisible (false );
415415 highPassResonanceQualityLabel.setVisible (false );
416416 }
417-
417+ waveformComponent-> setCornerRadius ( sc (cornerRadius * innerCorner));
418418 // Window
419419 setResizable (false , false );
420420 setSize (sc (810 ), sc (940 ));
@@ -437,6 +437,7 @@ PlasmaAudioProcessorEditor::paint(juce::Graphics& g)
437437 // Front
438438 g.setColour (getForegroundColor ());
439439 g.fillRect (headerArea ());
440+ waveformComponent->setCornerRadius (sc (cornerRadius * innerCorner));
440441 g.fillRoundedRectangle (monitorArea ().toFloat (), sc (cornerRadius));
441442 g.fillRoundedRectangle (inArea ().toFloat (), sc (cornerRadius));
442443 g.fillRoundedRectangle (outArea ().toFloat (), sc (cornerRadius));
@@ -450,7 +451,7 @@ PlasmaAudioProcessorEditor::paint(juce::Graphics& g)
450451 // Monitor Background
451452 g.setColour (getBackgroundColor ());
452453 g.fillRoundedRectangle (monitorArea ().reduced (sc (padding)).toFloat (),
453- sc (cornerRadius * 0.8 ));
454+ sc (cornerRadius * innerCorner ));
454455
455456 float lineSize = sc (2 .0f );
456457 Line<float > inLine (Point<float >(inArea ().getCentreX () - sc (33 ),
@@ -806,29 +807,32 @@ PlasmaAudioProcessorEditor::setAnalyserType(AnalyserType analyser)
806807 // Waveform
807808 if (analyser == AnalyserType::Waveform) {
808809 waveformComponent->setVisible (true );
809- } else {
810- waveformComponent->setVisible (false );
810+ responseCurveComponent.setVisible (false );
811+ earlyShapercurveComponent.setVisible (false );
812+ lateShapercurveComponent.setVisible (false );
811813 }
812-
813814 // Repsonse
814815 if (analyser == AnalyserType::Response) {
815816 responseCurveComponent.setVisible (true );
816- } else {
817- responseCurveComponent.setVisible (false );
817+ earlyShapercurveComponent.setVisible (false );
818+ lateShapercurveComponent.setVisible (false );
819+ waveformComponent->setVisible (false );
818820 }
819-
820821 // Distortion
821822 if (analyser == AnalyserType::Shapercurve) {
822823 earlyShapercurveComponent.setVisible (true );
823824 lateShapercurveComponent.setVisible (true );
824- } else {
825- earlyShapercurveComponent.setVisible (false );
826- lateShapercurveComponent.setVisible (false );
825+ waveformComponent->setVisible (false );
826+ responseCurveComponent.setVisible (false );
827827 }
828828
829829 // Options
830830 if (analyser == AnalyserType::Options) {
831831 configWindow (true );
832+ waveformComponent->setVisible (false );
833+ responseCurveComponent.setVisible (false );
834+ earlyShapercurveComponent.setVisible (false );
835+ lateShapercurveComponent.setVisible (false );
832836 } else {
833837 configWindow (false );
834838 }
@@ -945,7 +949,7 @@ PlasmaAudioProcessorEditor::fs_titelLabel()
945949void
946950PlasmaAudioProcessorEditor::resized ()
947951{
948-
952+ waveformComponent-> setCornerRadius ( sc (cornerRadius * innerCorner));
949953 int knobSize = 123 ;
950954 // /////////////////////////////////////////////////////////////////////////////////////////
951955 // Monitor
@@ -1802,6 +1806,7 @@ void
18021806PlasmaAudioProcessorEditor::setCornerRadius (int cornerRadius)
18031807{
18041808 this ->cornerRadius = cornerRadius;
1809+ waveformComponent->setCornerRadius (sc (cornerRadius * innerCorner));
18051810 updateTextboxes ();
18061811}
18071812
0 commit comments