diff --git a/modules/juce_gui_basics/buttons/juce_HyperlinkButton.cpp b/modules/juce_gui_basics/buttons/juce_HyperlinkButton.cpp index d5d09ebee6..8274f4c123 100644 --- a/modules/juce_gui_basics/buttons/juce_HyperlinkButton.cpp +++ b/modules/juce_gui_basics/buttons/juce_HyperlinkButton.cpp @@ -74,7 +74,7 @@ Font HyperlinkButton::getFontToUse() const void HyperlinkButton::changeWidthToFitText() { - setSize (getFontToUse().getStringWidth (getName()) + 6, getHeight()); + setSize (getFontToUse().getStringWidth (getButtonText()) + 6, getHeight()); } void HyperlinkButton::colourChanged()