Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enables all colour configuration available for the TextEditor in a Label #1493

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading