Browse Source

Added a method for changing the corner size of a CallOutBox

tags/2021-05-28
Tom Poole 5 years ago
parent
commit
3c9fe89636
4 changed files with 8 additions and 1 deletions
  1. +5
    -0
      modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp
  2. +1
    -0
      modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.h
  3. +1
    -1
      modules/juce_gui_basics/windows/juce_CallOutBox.cpp
  4. +1
    -0
      modules/juce_gui_basics/windows/juce_CallOutBox.h

+ 5
- 0
modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp 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)


+ 1
- 0
modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.h 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;


+ 1
- 1
modules/juce_gui_basics/windows/juce_CallOutBox.cpp 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()


+ 1
- 0
modules/juce_gui_basics/windows/juce_CallOutBox.h 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;
};
//==============================================================================


Loading…
Cancel
Save