mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-17 00:44:19 +00:00
AudioProcessorEditor: Set ComponentBoundsConstrainer stretchingTop/Left/Bottom/Right values when calling setBoundsForComponent()
This commit is contained in:
parent
df06a471c0
commit
ad8f2013b5
1 changed files with 13 additions and 3 deletions
|
|
@ -146,10 +146,20 @@ void AudioProcessorEditor::attachResizableCornerComponent()
|
|||
|
||||
void AudioProcessorEditor::setBoundsConstrained (Rectangle<int> newBounds)
|
||||
{
|
||||
if (constrainer != nullptr)
|
||||
constrainer->setBoundsForComponent (this, newBounds, false, false, false, false);
|
||||
else
|
||||
if (constrainer == nullptr)
|
||||
{
|
||||
setBounds (newBounds);
|
||||
return;
|
||||
}
|
||||
|
||||
auto currentBounds = getBounds();
|
||||
|
||||
constrainer->setBoundsForComponent (this,
|
||||
newBounds,
|
||||
newBounds.getY() != currentBounds.getY() && newBounds.getBottom() == currentBounds.getBottom(),
|
||||
newBounds.getX() != currentBounds.getX() && newBounds.getRight() == currentBounds.getRight(),
|
||||
newBounds.getY() == currentBounds.getY() && newBounds.getBottom() != currentBounds.getBottom(),
|
||||
newBounds.getX() == currentBounds.getX() && newBounds.getRight() != currentBounds.getRight());
|
||||
}
|
||||
|
||||
void AudioProcessorEditor::editorResized (bool wasResized)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue