From 22f2d111b9424fefe4e4c84bc61a051645d99a33 Mon Sep 17 00:00:00 2001 From: kaz saita Date: Tue, 10 Dec 2024 12:19:35 +0900 Subject: [PATCH] Enables all colour configuration available for the TextEditor in a juce::Label. --- modules/juce_gui_basics/widgets/juce_Label.cpp | 4 ++++ modules/juce_gui_basics/widgets/juce_Label.h | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/modules/juce_gui_basics/widgets/juce_Label.cpp b/modules/juce_gui_basics/widgets/juce_Label.cpp index a8b4d2454021..744c2ef13bee 100644 --- a/modules/juce_gui_basics/widgets/juce_Label.cpp +++ b/modules/juce_gui_basics/widgets/juce_Label.cpp @@ -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; } diff --git a/modules/juce_gui_basics/widgets/juce_Label.h b/modules/juce_gui_basics/widgets/juce_Label.h index 3560b55ded6f..bfeb9c2786d5 100644 --- a/modules/juce_gui_basics/widgets/juce_Label.h +++ b/modules/juce_gui_basics/widgets/juce_Label.h @@ -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. */ }; //==============================================================================