Skip to content

Commit

Permalink
Enables all colour configuration available for the TextEditor in a ju…
Browse files Browse the repository at this point in the history
…ce::Label.
  • Loading branch information
kinoshita-lab committed Dec 10, 2024
1 parent 67e7a63 commit 22f2d11
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions modules/juce_gui_basics/widgets/juce_Label.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,10 @@ TextEditor* Label::createEditorComponent()
copyColourIfSpecified (*this, *ed, textWhenEditingColourId, TextEditor::textColourId);
copyColourIfSpecified (*this, *ed, backgroundWhenEditingColourId, TextEditor::backgroundColourId);
copyColourIfSpecified (*this, *ed, outlineWhenEditingColourId, TextEditor::focusedOutlineColourId);
copyColourIfSpecified (*this, *ed, highlightWhenEditingColourId, TextEditor::highlightColourId);
copyColourIfSpecified (*this, *ed, highlightTextWhenEditingColourId, TextEditor::highlightedTextColourId);
copyColourIfSpecified (*this, *ed, focusedOutlineWhenEditingColourId, TextEditor::focusedOutlineColourId);
copyColourIfSpecified (*this, *ed, shadowColourIdWhenEditingColourId, TextEditor::shadowColourId);

return ed;
}
Expand Down
6 changes: 5 additions & 1 deletion modules/juce_gui_basics/widgets/juce_Label.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,11 @@ class JUCE_API Label : public Component,
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. */
outlineWhenEditingColourId = 0x1000285, /**< An optional border colour when the label is being edited. */
highlightWhenEditingColourId = 0x1000286, /**< The highlight colour when the label is being edited. */
highlightTextWhenEditingColourId = 0x1000287, /**< The highlighted text colour when the label is being edited. */
focusedOutlineWhenEditingColourId = 0x1000288, /**< Colour for drawing a box around the edge of the component when it has focus when the label is being edited. */
shadowColourIdWhenEditingColourId = 0x1000289, /**< Colour for drawing an inner shadow around the edge of the editor when the label is being edited. */
};

//==============================================================================
Expand Down

0 comments on commit 22f2d11

Please sign in to comment.