diff --git a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp index ac9cd44d41..37dc124571 100644 --- a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp +++ b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp @@ -2357,6 +2357,10 @@ void LookAndFeel_V2::drawCallOutBoxBackground (CallOutBox& box, Graphics& g, g.strokePath (path, PathStrokeType (2.0f)); } +int LookAndFeel_V2::getCallOutBoxBorderSize (const CallOutBox&) +{ + return 20; +} //============================================================================== AttributedString LookAndFeel_V2::createFileChooserHeaderText (const String& title, diff --git a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.h b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.h index eb9395be13..f728df3bed 100644 --- a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.h +++ b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.h @@ -285,6 +285,7 @@ public: //============================================================================== void drawCallOutBoxBackground (CallOutBox&, Graphics&, const Path& path, Image& cachedImage) override; + int getCallOutBoxBorderSize (const CallOutBox&) override; //============================================================================== void drawLevelMeter (Graphics&, int width, int height, float level) override; diff --git a/modules/juce_gui_basics/windows/juce_CallOutBox.cpp b/modules/juce_gui_basics/windows/juce_CallOutBox.cpp index 9b877fee5a..39cc28b8e0 100644 --- a/modules/juce_gui_basics/windows/juce_CallOutBox.cpp +++ b/modules/juce_gui_basics/windows/juce_CallOutBox.cpp @@ -91,7 +91,7 @@ void CallOutBox::setArrowSize (const float newSize) int CallOutBox::getBorderSize() const noexcept { - return jmax (20, (int) arrowSize); + return jmax (getLookAndFeel().getCallOutBoxBorderSize (*this), (int) arrowSize); } void CallOutBox::paint (Graphics& g) diff --git a/modules/juce_gui_basics/windows/juce_CallOutBox.h b/modules/juce_gui_basics/windows/juce_CallOutBox.h index a87a52cfbb..8f574c1a78 100644 --- a/modules/juce_gui_basics/windows/juce_CallOutBox.h +++ b/modules/juce_gui_basics/windows/juce_CallOutBox.h @@ -130,6 +130,7 @@ public: virtual ~LookAndFeelMethods() {} virtual void drawCallOutBoxBackground (CallOutBox&, Graphics&, const Path&, Image& cachedImage) = 0; + virtual int getCallOutBoxBorderSize (const CallOutBox&) = 0; }; //==============================================================================