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

Added LookAndFeel getAlertWindowButtonWidth method to override the width of alert buttons

This commit is contained in:
hogliux 2016-11-15 10:41:11 +00:00
parent ee4fe9e463
commit 1c2d1479b4
4 changed files with 11 additions and 1 deletions

View file

@ -489,6 +489,11 @@ int LookAndFeel_V2::getAlertBoxWindowFlags()
| ComponentPeer::windowHasDropShadow;
}
int LookAndFeel_V2::getAlertWindowButtonWidth (TextButton& b)
{
return getTextButtonWidthToFitText (b, getAlertWindowButtonHeight());
}
int LookAndFeel_V2::getAlertWindowButtonHeight()
{
return 28;

View file

@ -66,6 +66,8 @@ public:
void drawAlertBox (Graphics&, AlertWindow&, const Rectangle<int>& textArea, TextLayout&) override;
int getAlertBoxWindowFlags() override;
int getAlertWindowButtonWidth (TextButton&) override;
int getAlertWindowButtonHeight() override;
/** Override this function to supply a custom font for the alert window title.