Skip to content

Commit

Permalink
Triangle back.
Browse files Browse the repository at this point in the history
  • Loading branch information
mulshine committed Jul 1, 2018
1 parent 8e06ca4 commit 2da32c3
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
2 changes: 0 additions & 2 deletions bk_JUCE/bitKlavier/Source/MainViewController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ timerCallbackCount(0)
mainSlider->setDoubleClickReturnValue (true, 0.0); // double-clicking this slider will set it to 50.0
mainSlider->setTextValueSuffix (" dB");
mainSlider->addListener(this);


addAndMakeVisible (mainSlider);

Expand Down Expand Up @@ -108,7 +107,6 @@ timerCallbackCount(0)
addAndMakeVisible(construction);

addChildComponent(overtop);


juce::Point<int> myshadowOffset(2, 2);
DropShadow myshadow(Colours::darkgrey, 5, myshadowOffset);
Expand Down
14 changes: 13 additions & 1 deletion bk_JUCE/bitKlavier/Source/PluginEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
BKAudioProcessorEditor::BKAudioProcessorEditor (BKAudioProcessor& p):
AudioProcessorEditor (&p),
processor (p),
mvc(p)
mvc(p),
constrain(new ComponentBoundsConstrainer()),
resizer(new ResizableCornerComponent (this, constrain))
{
viewPort.setViewedComponent(&mvc);
viewPort.setViewPosition(0, 0);
Expand All @@ -28,6 +30,12 @@ mvc(p)
setSize((processor.screenWidth < DEFAULT_WIDTH) ? processor.screenWidth : DEFAULT_WIDTH,
(processor.screenHeight < DEFAULT_HEIGHT) ? processor.screenHeight : DEFAULT_HEIGHT);

#endif
constrain->setSizeLimits(DEFAULT_MIN_WIDTH, DEFAULT_MIN_HEIGHT, processor.screenWidth, processor.screenHeight);

#if !JUCE_IOS
addAndMakeVisible(resizer);
resizer->setAlwaysOnTop(true);
#endif

//processor.updateState->pianoDidChangeForGraph = true;
Expand All @@ -53,6 +61,10 @@ void BKAudioProcessorEditor::resized()

mvc.setSize(getWidth(), getHeight());
mvc.resized();

#if !JUCE_IOS
resizer->setBounds(getWidth()-16, getHeight()-16, 16, 16);
#endif

}

Expand Down
5 changes: 4 additions & 1 deletion bk_JUCE/bitKlavier/Source/PluginEditor.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ class BKAudioProcessorEditor : public AudioProcessorEditor

MainViewController mvc;

//BKButtonAndMenuLAF laf;
//BKButtonAndMenuLAF laf;

ScopedPointer<ComponentBoundsConstrainer> constrain;
ScopedPointer<ResizableCornerComponent> resizer;

JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (BKAudioProcessorEditor)
};
Expand Down

0 comments on commit 2da32c3

Please sign in to comment.