Browse Source

Toggle button parameter tweak

tags/v100_p5
xenakios 7 years ago
parent
commit
4caaf1f5e0
1 changed files with 5 additions and 2 deletions
  1. +5
    -2
      Source/PluginEditor.h

+ 5
- 2
Source/PluginEditor.h View File

@@ -130,16 +130,19 @@ public:
m_togglebut = std::make_unique<ToggleButton>();
m_togglebut->setToggleState(*boolpar, dontSendNotification);
m_togglebut->addListener(this);
m_togglebut->setButtonText(par->getName(50));
addAndMakeVisible(m_togglebut.get());
}
}
void resized() override
{
m_label.setBounds(0, 0, 200, 24);
if (m_slider)
{
m_label.setBounds(0, 0, 200, 24);
m_slider->setBounds(m_label.getRight() + 1, 0, getWidth() - 2 - m_label.getWidth(), 24);
}
if (m_togglebut)
m_togglebut->setBounds(m_label.getRight() + 1, 0, getWidth() - 2 - m_label.getWidth(), 24);
m_togglebut->setBounds(1, 0, getWidth() -1, 24);
}
void sliderValueChanged(Slider* slid) override
{


Loading…
Cancel
Save