| @@ -489,6 +489,11 @@ int LookAndFeel_V2::getAlertBoxWindowFlags() | |||||
| | ComponentPeer::windowHasDropShadow; | | ComponentPeer::windowHasDropShadow; | ||||
| } | } | ||||
| int LookAndFeel_V2::getAlertWindowButtonWidth (TextButton& b) | |||||
| { | |||||
| return getTextButtonWidthToFitText (b, getAlertWindowButtonHeight()); | |||||
| } | |||||
| int LookAndFeel_V2::getAlertWindowButtonHeight() | int LookAndFeel_V2::getAlertWindowButtonHeight() | ||||
| { | { | ||||
| return 28; | return 28; | ||||
| @@ -66,6 +66,8 @@ public: | |||||
| void drawAlertBox (Graphics&, AlertWindow&, const Rectangle<int>& textArea, TextLayout&) override; | void drawAlertBox (Graphics&, AlertWindow&, const Rectangle<int>& textArea, TextLayout&) override; | ||||
| int getAlertBoxWindowFlags() override; | int getAlertBoxWindowFlags() override; | ||||
| int getAlertWindowButtonWidth (TextButton&) override; | |||||
| int getAlertWindowButtonHeight() override; | int getAlertWindowButtonHeight() override; | ||||
| /** Override this function to supply a custom font for the alert window title. | /** Override this function to supply a custom font for the alert window title. | ||||
| @@ -98,7 +98,9 @@ void AlertWindow::addButton (const String& name, | |||||
| b->addShortcut (shortcutKey1); | b->addShortcut (shortcutKey1); | ||||
| b->addShortcut (shortcutKey2); | b->addShortcut (shortcutKey2); | ||||
| b->addListener (this); | b->addListener (this); | ||||
| b->changeWidthToFitText (getLookAndFeel().getAlertWindowButtonHeight()); | |||||
| b->setSize (getLookAndFeel().getAlertWindowButtonWidth (*b), | |||||
| getLookAndFeel().getAlertWindowButtonHeight()); | |||||
| addAndMakeVisible (b, 0); | addAndMakeVisible (b, 0); | ||||
| @@ -435,6 +435,7 @@ public: | |||||
| virtual int getAlertBoxWindowFlags() = 0; | virtual int getAlertBoxWindowFlags() = 0; | ||||
| virtual int getAlertWindowButtonWidth (TextButton&) = 0; | |||||
| virtual int getAlertWindowButtonHeight() = 0; | virtual int getAlertWindowButtonHeight() = 0; | ||||
| virtual Font getAlertWindowTitleFont() = 0; | virtual Font getAlertWindowTitleFont() = 0; | ||||