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:
parent
0caf83439a
commit
996f44f3f6
2 changed files with 18 additions and 0 deletions
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue