1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Added set and getJustificationType() methods to HyperlinkButton

This commit is contained in:
ed 2017-10-12 12:29:58 +01:00
parent 0caf83439a
commit 996f44f3f6
2 changed files with 18 additions and 0 deletions

View file

@ -82,6 +82,15 @@ void HyperlinkButton::changeWidthToFitText()
setSize (getFontToUse().getStringWidth (getButtonText()) + 6, getHeight());
}
void HyperlinkButton::setJustificationType (Justification newJustification)
{
if (justification != newJustification)
{
justification = newJustification;
repaint();
}
}
void HyperlinkButton::colourChanged()
{
repaint();

View file

@ -91,6 +91,15 @@ public:
*/
void changeWidthToFitText();
//==============================================================================
/** Sets the style of justification to be used for positioning the text.
(The default is Justification::centred)
*/
void setJustificationType (Justification justification);
/** Returns the type of justification, as set in setJustificationType(). */
Justification getJustificationType() const noexcept { return justification; }
protected:
//==============================================================================
/** @internal */