Skip to content

Commit

Permalink
Improved layout
Browse files Browse the repository at this point in the history
  • Loading branch information
getdunne committed Oct 2, 2017
1 parent cf7bdbc commit 63c5658
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions Source/GuiOscTab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ GuiOscTab::GuiOscTab (SynthSound* pSynthSound)
initLabel(semiLabel2);
initLabel(detuneLabel2);
initLabel(oscBlendLabel);
oscBlendLabel.setJustificationType(Justification::centred);
oscBlendLabel.setJustificationType(Justification::centredLeft);

auto initCombo = [this](ComboBox& combo)
{
Expand Down Expand Up @@ -60,9 +60,9 @@ GuiOscTab::GuiOscTab (SynthSound* pSynthSound)
initSlider(detuneSlider2); detuneSlider2.setRange(-50, 50, 0);

addAndMakeVisible(oscBlendSlider);
oscBlendSlider.setRange(0, 100, 0);
oscBlendSlider.setRange(0, 100, 1);
oscBlendSlider.setSliderStyle(Slider::LinearVertical);
oscBlendSlider.setTextBoxStyle(Slider::TextBoxAbove, false, 80, 20);
oscBlendSlider.setTextBoxStyle(Slider::TextBoxRight, false, 40, 20);
oscBlendSlider.addListener(this);

notify();
Expand All @@ -87,9 +87,9 @@ void GuiOscTab::resized()
const int sliderWidth = 344;
const int controlHeight = 24;
const int gapHeight = 8;
const int blendSliderLeft = 510;
const int blendSliderWidth = 60;
const int blendSliderHeight = 240;
const int blendSliderLeft = 500;
const int blendSliderWidth = 80;
const int blendSliderHeight = 200;

int top = 20;
wfLabel1.setBounds (labelLeft, top, labelWidth, controlHeight);
Expand All @@ -112,9 +112,9 @@ void GuiOscTab::resized()
detuneSlider2.setBounds(controlLeft, top, sliderWidth, controlHeight);

top = 20;
oscBlendLabel.setBounds(blendSliderLeft, top, labelWidth, controlHeight);
top += controlHeight;
oscBlendSlider.setBounds(blendSliderLeft, top, blendSliderWidth, blendSliderHeight);
top += blendSliderHeight + gapHeight;
oscBlendLabel.setBounds(blendSliderLeft + blendSliderWidth/2 - labelWidth/2, top, labelWidth, controlHeight);
}

void GuiOscTab::comboBoxChanged (ComboBox* comboBoxThatHasChanged)
Expand Down
2 changes: 1 addition & 1 deletion Source/PluginEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ VanillaJuceAudioProcessorEditor::VanillaJuceAudioProcessorEditor (VanillaJuceAud
, processor (p)
, guiTabs(p.getSound())
{
setSize (600, 400);
setSize (600, 300);
addAndMakeVisible(&guiTabs);
p.addChangeListener(this);
}
Expand Down

0 comments on commit 63c5658

Please sign in to comment.