upgrade to JUCE 5.4.3. Remove (probably) unused JUCE modules. Remove VST2 target (it's been end-of-life'd by Steinberg and by JUCE)

This commit is contained in:
Alex Birch
2019-06-22 20:41:38 +01:00
parent d22c2cd4fa
commit 9ee566b251
1140 changed files with 67534 additions and 105952 deletions

View File

@ -131,16 +131,17 @@ void Label::setBorderSize (BorderSize<int> newBorder)
//==============================================================================
Component* Label::getAttachedComponent() const
{
return static_cast<Component*> (ownerComponent);
return ownerComponent.get();
}
void Label::attachToComponent (Component* owner, bool onLeft)
{
jassert (owner != this); // Not a great idea to try to attach it to itself!
if (ownerComponent != nullptr)
ownerComponent->removeComponentListener (this);
ownerComponent = owner;
leftOfOwnerComp = onLeft;
if (ownerComponent != nullptr)
@ -154,19 +155,21 @@ void Label::attachToComponent (Component* owner, bool onLeft)
void Label::componentMovedOrResized (Component& component, bool /*wasMoved*/, bool /*wasResized*/)
{
auto f = getLookAndFeel().getLabelFont (*this);
auto& lf = getLookAndFeel();
auto f = lf.getLabelFont (*this);
auto borderSize = lf.getLabelBorderSize (*this);
if (leftOfOwnerComp)
{
auto width = jmin (roundToInt (f.getStringWidthFloat (textValue.toString()) + 0.5f)
+ getBorderSize().getLeftAndRight(),
+ borderSize.getLeftAndRight(),
component.getX());
setBounds (component.getX() - width, component.getY(), width, component.getHeight());
}
else
{
auto height = getBorderSize().getTopAndBottom() + 6 + roundToInt (f.getHeight() + 0.5f);
auto height = borderSize.getTopAndBottom() + 6 + roundToInt (f.getHeight() + 0.5f);
setBounds (component.getX(), component.getY() - height, component.getWidth(), height);
}