mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-02-01 03:10:06 +00:00
Tweaked the format of a ComponentBoundsConstrainer method
This commit is contained in:
parent
29a357fa6f
commit
ad5d7a4254
6 changed files with 22 additions and 24 deletions
|
|
@ -234,15 +234,15 @@ void ComponentOverlayComponent::checkBounds (Rectangle<int>& b,
|
|||
}
|
||||
}
|
||||
|
||||
void ComponentOverlayComponent::applyBoundsToComponent (Component* component, const Rectangle<int>& b)
|
||||
void ComponentOverlayComponent::applyBoundsToComponent (Component& component, Rectangle<int> b)
|
||||
{
|
||||
if (component->getBounds() != b)
|
||||
if (component.getBounds() != b)
|
||||
{
|
||||
layout.getDocument()->getUndoManager().undoCurrentTransactionOnly();
|
||||
|
||||
component->setBounds (b);
|
||||
component.setBounds (b);
|
||||
|
||||
if (Component* const parent = target->getParentComponent())
|
||||
if (auto* parent = target->getParentComponent())
|
||||
target->setBounds (b.getX() + borderThickness - parent->getX(),
|
||||
b.getY() + borderThickness - parent->getY(),
|
||||
b.getWidth() - borderThickness * 2,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue