Label::componentMovedOrResized bug

Hi Jules,

 

Here is bug fix regarding Label::componentMovedOrResized implementation which contains hardcoded values right now.

 

void Label::componentMovedOrResized (Component& component, bool /*wasMoved*/, bool /*wasResized*/)
{
    const Font f (getLookAndFeel().getLabelFont (*this));

    if (leftOfOwnerComp)
    {
setSize(jmin(std::ceil(f.getStringWidthFloat(textValue.toString())) + getBorderSize().getLeftAndRight(), component.getX()),
        component.getHeight());

        setTopRightPosition (component.getX(), component.getY());
    }
    else
    {
        setSize (component.getWidth(),
          getBorderSize().getTopAndBottom() + std::ceil(f.getHeight()));

        setTopLeftPosition (component.getX(), component.getY() - getHeight());
    }
} 

Thanks,

Cheers, will take a look..