diff --git a/modules/juce_gui_basics/widgets/juce_Label.cpp b/modules/juce_gui_basics/widgets/juce_Label.cpp index 727aacfb8e..542f71896d 100644 --- a/modules/juce_gui_basics/widgets/juce_Label.cpp +++ b/modules/juce_gui_basics/widgets/juce_Label.cpp @@ -294,6 +294,16 @@ TextEditor* Label::createEditorComponent() TextEditor* const ed = new TextEditor (getName()); ed->applyFontToAllText (getLookAndFeel().getLabelFont (*this)); copyAllExplicitColoursTo (*ed); + + if (isColourSpecified (textWhenEditingColourId)) + ed->setColour (TextEditor::textColourId, findColour (textWhenEditingColourId)); + + if (isColourSpecified (backgroundWhenEditingColourId)) + ed->setColour (TextEditor::backgroundColourId, findColour (backgroundWhenEditingColourId)); + + if (isColourSpecified (outlineWhenEditingColourId)) + ed->setColour (TextEditor::outlineColourId, findColour (outlineWhenEditingColourId)); + return ed; } diff --git a/modules/juce_gui_basics/widgets/juce_Label.h b/modules/juce_gui_basics/widgets/juce_Label.h index a0e2f80c39..e47fb681e6 100644 --- a/modules/juce_gui_basics/widgets/juce_Label.h +++ b/modules/juce_gui_basics/widgets/juce_Label.h @@ -101,10 +101,13 @@ public: */ enum ColourIds { - backgroundColourId = 0x1000280, /**< The background colour to fill the label with. */ - textColourId = 0x1000281, /**< The colour for the text. */ - outlineColourId = 0x1000282 /**< An optional colour to use to draw a border around the label. - Leave this transparent to not have an outline. */ + backgroundColourId = 0x1000280, /**< The background colour to fill the label with. */ + textColourId = 0x1000281, /**< The colour for the text. */ + outlineColourId = 0x1000282, /**< An optional colour to use to draw a border around the label. + Leave this transparent to not have an outline. */ + backgroundWhenEditingColourId = 0x1000283, /**< The background colour when the label is being edited. */ + textWhenEditingColourId = 0x1000284, /**< The colour for the text when the label is being edited. */ + outlineWhenEditingColourId = 0x1000285 /**< An optional border colour when the label is being edited. */ }; //==============================================================================