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

Added a method for changing the corner size of a CallOutBox

This commit is contained in:
Tom Poole 2019-07-23 11:11:40 +01:00
parent 2fe00ba4da
commit 3c9fe89636
4 changed files with 8 additions and 1 deletions

View file

@ -2513,6 +2513,11 @@ int LookAndFeel_V2::getCallOutBoxBorderSize (const CallOutBox&)
return 20;
}
float LookAndFeel_V2::getCallOutBoxCornerSize (const CallOutBox&)
{
return 9.0f;
}
//==============================================================================
AttributedString LookAndFeel_V2::createFileChooserHeaderText (const String& title,
const String& instructions)

View file

@ -327,6 +327,7 @@ public:
//==============================================================================
void drawCallOutBoxBackground (CallOutBox&, Graphics&, const Path& path, Image& cachedImage) override;
int getCallOutBoxBorderSize (const CallOutBox&) override;
float getCallOutBoxCornerSize (const CallOutBox&) override;
//==============================================================================
void drawLevelMeter (Graphics&, int width, int height, float level) override;

View file

@ -254,7 +254,7 @@ void CallOutBox::refreshPath()
outline.addBubble (content.getBounds().toFloat().expanded (gap, gap),
getLocalBounds().toFloat(),
targetPoint - getPosition().toFloat(),
9.0f, arrowSize * 0.7f);
getLookAndFeel().getCallOutBoxCornerSize (*this), arrowSize * 0.7f);
}
void CallOutBox::timerCallback()

View file

@ -145,6 +145,7 @@ public:
virtual void drawCallOutBoxBackground (CallOutBox&, Graphics&, const Path&, Image&) = 0;
virtual int getCallOutBoxBorderSize (const CallOutBox&) = 0;
virtual float getCallOutBoxCornerSize (const CallOutBox&) = 0;
};
//==============================================================================