Browse Source

AlertWindow: Fixed an issue with the AlertWindow's text block having incorrect colours

tags/2021-05-28
hogliux 7 years ago
parent
commit
d59ec0ceef
1 changed files with 7 additions and 7 deletions
  1. +7
    -7
      modules/juce_gui_basics/windows/juce_AlertWindow.cpp

+ 7
- 7
modules/juce_gui_basics/windows/juce_AlertWindow.cpp View File

@@ -215,6 +215,13 @@ class AlertTextComp : public TextEditor
public:
AlertTextComp (AlertWindow& owner, const String& message, const Font& font)
{
if (owner.isColourSpecified (AlertWindow::textColourId))
setColour (TextEditor::textColourId, owner.findColour (AlertWindow::textColourId));
setColour (TextEditor::backgroundColourId, Colours::transparentBlack);
setColour (TextEditor::outlineColourId, Colours::transparentBlack);
setColour (TextEditor::shadowColourId, Colours::transparentBlack);
setReadOnly (true);
setMultiLine (true, true);
setCaretVisible (false);
@@ -226,13 +233,6 @@ public:
setText (message, false);
bestWidth = 2 * (int) std::sqrt (font.getHeight() * font.getStringWidth (message));
if (owner.isColourSpecified (AlertWindow::textColourId))
setColour (TextEditor::textColourId, owner.findColour (AlertWindow::textColourId));
setColour (TextEditor::backgroundColourId, Colours::transparentBlack);
setColour (TextEditor::outlineColourId, Colours::transparentBlack);
setColour (TextEditor::shadowColourId, Colours::transparentBlack);
}
int getPreferredWidth() const noexcept { return bestWidth; }


Loading…
Cancel
Save