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:
parent
a4d4e9e5b0
commit
d59ec0ceef
1 changed files with 7 additions and 7 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue