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

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

This commit is contained in:
hogliux 2017-07-31 14:37:23 +01:00
parent a4d4e9e5b0
commit d59ec0ceef

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; }