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