Browse Source

tags/2021-05-28
jules 17 years ago
parent
commit
7f3a423c6e
3 changed files with 17 additions and 3 deletions
  1. +10
    -0
      src/juce_appframework/gui/components/lookandfeel/juce_LookAndFeel.cpp
  2. +4
    -0
      src/juce_appframework/gui/components/lookandfeel/juce_LookAndFeel.h
  3. +3
    -3
      src/juce_appframework/gui/components/windows/juce_AlertWindow.cpp

+ 10
- 0
src/juce_appframework/gui/components/lookandfeel/juce_LookAndFeel.cpp View File

@@ -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)


+ 4
- 0
src/juce_appframework/gui/components/lookandfeel/juce_LookAndFeel.h View File

@@ -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


+ 3
- 3
src/juce_appframework/gui/components/windows/juce_AlertWindow.cpp View File

@@ -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;)


Loading…
Cancel
Save