diff --git a/src/juce_appframework/gui/components/lookandfeel/juce_LookAndFeel.cpp b/src/juce_appframework/gui/components/lookandfeel/juce_LookAndFeel.cpp index a7109bb516..9cf053d9fd 100644 --- a/src/juce_appframework/gui/components/lookandfeel/juce_LookAndFeel.cpp +++ b/src/juce_appframework/gui/components/lookandfeel/juce_LookAndFeel.cpp @@ -509,6 +509,16 @@ int LookAndFeel::getAlertBoxWindowFlags() | ComponentPeer::windowHasDropShadow; } +int LookAndFeel::getAlertWindowButtonHeight() +{ + return 28; +} + +const Font LookAndFeel::getAlertWindowFont() +{ + return Font (12.0f); +} + void LookAndFeel::drawProgressBar (Graphics& g, ProgressBar& progressBar, int width, int height, double progress, const String& textToShow) diff --git a/src/juce_appframework/gui/components/lookandfeel/juce_LookAndFeel.h b/src/juce_appframework/gui/components/lookandfeel/juce_LookAndFeel.h index 3c45ac6445..d351ac1ff0 100644 --- a/src/juce_appframework/gui/components/lookandfeel/juce_LookAndFeel.h +++ b/src/juce_appframework/gui/components/lookandfeel/juce_LookAndFeel.h @@ -166,6 +166,10 @@ public: virtual int getAlertBoxWindowFlags(); + virtual int getAlertWindowButtonHeight(); + + virtual const Font getAlertWindowFont(); + /** Draws a progress bar. If the progress value is less than 0 or greater than 1.0, this should draw a spinning diff --git a/src/juce_appframework/gui/components/windows/juce_AlertWindow.cpp b/src/juce_appframework/gui/components/windows/juce_AlertWindow.cpp index 6933718573..b994d8c90c 100644 --- a/src/juce_appframework/gui/components/windows/juce_AlertWindow.cpp +++ b/src/juce_appframework/gui/components/windows/juce_AlertWindow.cpp @@ -179,7 +179,7 @@ void AlertWindow::addButton (const String& name, b->addShortcut (shortcutKey1); b->addShortcut (shortcutKey2); b->addButtonListener (this); - b->changeWidthToFitText (28); + b->changeWidthToFitText (getLookAndFeel().getAlertWindowButtonHeight()); addAndMakeVisible (b, 0); buttons.add (b); @@ -363,8 +363,8 @@ void AlertWindow::paint (Graphics& g) { getLookAndFeel().drawAlertBox (g, *this, textArea, textLayout); - g.setColour (Colours::black); - g.setFont (12.0f); + g.setColour (findColour (textColourId)); + g.setFont (getLookAndFeel().getAlertWindowFont()); int i; for (i = textBoxes.size(); --i >= 0;)