Skip to content

Commit

Permalink
Slight cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jatinchowdhury18 committed Jan 27, 2024
1 parent 8d11814 commit 75dccf2
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 12 deletions.
1 change: 0 additions & 1 deletion src/gui/BandSplitter/BandSplitterEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,4 @@ void BandSplitterEditor::TriStateButton::paintButton (juce::Graphics& g, bool, b
const auto pad = proportionOfWidth (0.2f);
g.drawFittedText (text, getLocalBounds().reduced (pad), juce::Justification::centred, 1);
}

} // namespace gui::band_splitter
4 changes: 1 addition & 3 deletions src/gui/BandSplitter/BandSplitterEditor.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

#include "BandSplitterPlot.h"
#include "TriStateButtonAttachment.h"
//#include "SlopePicker.h"
#include "gui/Shared/ChoicePicker.h"
#include "gui/Shared/SpectrumAnalyser.h"

Expand All @@ -29,8 +28,7 @@ class BandSplitterEditor : public juce::Component
{
TriStateButton (State& pluginState);
void paintButton (juce::Graphics& g, bool, bool) override;
// chowdsp::BoolParameter& threeBandOnOffParam;
// chowdsp::BoolParameter& fourBandOnOffParam;

gui::SharedFonts fonts;
TriStateButtonAttachment triStateButtonAttachment;
std::pair<BandState, int> currentState;
Expand Down
3 changes: 2 additions & 1 deletion src/gui/BandSplitter/BandSplitterPlot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ BandSplitterPlot::BandSplitterPlot (State& pluginState,
{
auto bandState = bandSplitterParams.getCurrentBandState();
cutoff2Slider.setVisible (bandState == BandState::ThreeBands || bandState == BandState::FourBands);
cutoff3Slider.setVisible (bandState == BandState::FourBands);
updateSpectrumPlots();
repaint();
}),
Expand All @@ -152,8 +153,8 @@ BandSplitterPlot::BandSplitterPlot (State& pluginState,
[this]
{
auto bandState = bandSplitterParams.getCurrentBandState();
cutoff3Slider.setVisible (bandState == BandState::FourBands);
cutoff2Slider.setVisible (bandState == BandState ::FourBands || bandState == BandState::ThreeBands);
cutoff3Slider.setVisible (bandState == BandState::FourBands);
updateSpectrumPlots();
repaint();
}),
Expand Down
5 changes: 0 additions & 5 deletions src/gui/BandSplitter/BandSplitterPlot.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@
#include "gui/Shared/SpectrumAnalyser.h"
#include "state/PluginState.h"

namespace dsp::band_splitter
{
enum class BandState;
}

namespace gui::band_splitter
{
class BandSplitterPlot : public chowdsp::EQ::EqualizerPlot
Expand Down
4 changes: 2 additions & 2 deletions src/gui/BandSplitter/TriStateButtonAttachment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ TriStateButtonAttachment::TriStateButtonAttachment (State& pluginState,
std::pair<BandState, int>& currentState)
: threeBandParam (pluginState.params.bandSplitParams->threeBandOnOff),
fourBandParam (pluginState.params.bandSplitParams->fourBandOnOff),
threeBandAttachment (threeBandParam, pluginState, [this] (bool threeBandOn)
threeBandAttachment (threeBandParam, pluginState, [this] (bool)
{ updateButtonState(); }),
fourBandAttachment (fourBandParam, pluginState, [this] (bool fourBandOn)
fourBandAttachment (fourBandParam, pluginState, [this] (bool)
{ updateButtonState(); }),
bandStateButton (&triStateButton),
um (pluginState.undoManager),
Expand Down

0 comments on commit 75dccf2

Please sign in to comment.