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

Added isProgressBarOpaque() method to ProgressBar::LookAndFeelMethods

This commit is contained in:
ed 2017-03-03 12:37:45 +00:00
parent f312721cf9
commit 182b0e4cb0
4 changed files with 9 additions and 1 deletions

View file

@ -607,6 +607,11 @@ void LookAndFeel_V2::drawSpinningWaitAnimation (Graphics& g, const Colour& colou
}
}
bool LookAndFeel_V2::isProgressBarOpaque (ProgressBar& progressBar)
{
return progressBar.findColour (ProgressBar::backgroundColourId).isOpaque();
}
bool LookAndFeel_V2::areScrollbarButtonsVisible()
{
return true;

View file

@ -89,6 +89,7 @@ public:
//==============================================================================
void drawProgressBar (Graphics&, ProgressBar&, int width, int height, double progress, const String& textToShow) override;
void drawSpinningWaitAnimation (Graphics&, const Colour& colour, int x, int y, int w, int h) override;
bool isProgressBarOpaque (ProgressBar&) override;
//==============================================================================
bool areScrollbarButtonsVisible() override;

View file

@ -49,7 +49,7 @@ void ProgressBar::setTextToDisplay (const String& text)
void ProgressBar::lookAndFeelChanged()
{
setOpaque (findColour (backgroundColourId).isOpaque());
setOpaque (getLookAndFeel().isProgressBarOpaque (*this));
}
void ProgressBar::colourChanged()

View file

@ -105,6 +105,8 @@ public:
*/
virtual void drawProgressBar (Graphics&, ProgressBar&, int width, int height,
double progress, const String& textToShow) = 0;
virtual bool isProgressBarOpaque (ProgressBar&) = 0;
};
protected: