From cf0e97fcc7d09f130fab217153cc4e35785bc274 Mon Sep 17 00:00:00 2001 From: ed Date: Mon, 8 May 2017 17:20:44 +0100 Subject: [PATCH] Projucer: Selected colour scheme is now stored and recalled. Multiple fixes for unreadable text in the GUI editor --- .../Source/Application/jucer_Application.cpp | 69 ++++++++++++------- .../Source/Application/jucer_Application.h | 2 + .../Source/Application/jucer_AutoUpdater.cpp | 10 ++- .../Application/jucer_GlobalPreferences.cpp | 64 +++++++++++------ .../Application/jucer_GlobalPreferences.h | 5 ++ .../properties/jucer_PositionPropertyBase.h | 19 +++-- .../ui/jucer_JucerDocumentEditor.cpp | 8 ++- .../ui/jucer_ResourceEditorPanel.cpp | 17 ++++- .../ui/jucer_ResourceEditorPanel.h | 2 + .../jucer_TextWithDefaultPropertyComponent.h | 6 +- .../jucer_DependencyPathPropertyComponent.cpp | 14 ++-- .../jucer_DependencyPathPropertyComponent.h | 2 + .../Utility/jucer_ProjucerLookAndFeel.cpp | 2 +- 13 files changed, 151 insertions(+), 69 deletions(-) diff --git a/extras/Projucer/Source/Application/jucer_Application.cpp b/extras/Projucer/Source/Application/jucer_Application.cpp index d06d74fcd1..2a2d8c00d7 100644 --- a/extras/Projucer/Source/Application/jucer_Application.cpp +++ b/extras/Projucer/Source/Application/jucer_Application.cpp @@ -117,6 +117,8 @@ void ProjucerApplication::initialise (const String& commandLine) settings->appearance.refreshPresetSchemeList(); + setColourScheme (settings->getGlobalProperties().getIntValue ("COLOUR SCHEME"), false); + // do further initialisation in a moment when the message loop has started triggerAsyncUpdate(); } @@ -499,32 +501,7 @@ void ProjucerApplication::handleMainMenuCommand (int menuItemID) } else if (menuItemID >= colourSchemeBaseID && menuItemID < colourSchemeBaseID + 3) { - auto& appearanceSettings = getAppSettings().appearance; - - if (menuItemID == colourSchemeBaseID) - { - lookAndFeel.setColourScheme (LookAndFeel_V4::getDarkColourScheme()); - appearanceSettings.selectPresetScheme (0); - } - else if (menuItemID == colourSchemeBaseID + 1) - { - lookAndFeel.setColourScheme (LookAndFeel_V4::getGreyColourScheme()); - appearanceSettings.selectPresetScheme (0); - } - else if (menuItemID == colourSchemeBaseID + 2) - { - lookAndFeel.setColourScheme (LookAndFeel_V4::getLightColourScheme()); - appearanceSettings.selectPresetScheme (1); - } - - lookAndFeel.setupColours(); - mainWindowList.sendLookAndFeelChange(); - - if (utf8Window != nullptr) utf8Window->sendLookAndFeelChange(); - if (svgPathWindow != nullptr) svgPathWindow->sendLookAndFeelChange(); - if (globalPreferencesWindow != nullptr) globalPreferencesWindow->sendLookAndFeelChange(); - if (aboutWindow != nullptr) aboutWindow->sendLookAndFeelChange(); - if (applicationUsageDataWindow != nullptr) applicationUsageDataWindow->sendLookAndFeelChange(); + setColourScheme (menuItemID - colourSchemeBaseID, true); } else { @@ -801,3 +778,43 @@ void ProjucerApplication::initCommandManager() registerGUIEditorCommands(); } + +void ProjucerApplication::setColourScheme (int index, bool saveSetting) +{ + auto& appearanceSettings = getAppSettings().appearance; + + if (index == 0) + { + lookAndFeel.setColourScheme (LookAndFeel_V4::getDarkColourScheme()); + appearanceSettings.selectPresetScheme (0); + } + else if (index == 1) + { + lookAndFeel.setColourScheme (LookAndFeel_V4::getGreyColourScheme()); + appearanceSettings.selectPresetScheme (0); + } + else if (index == 2) + { + lookAndFeel.setColourScheme (LookAndFeel_V4::getLightColourScheme()); + appearanceSettings.selectPresetScheme (1); + } + + lookAndFeel.setupColours(); + mainWindowList.sendLookAndFeelChange(); + + if (utf8Window != nullptr) utf8Window->sendLookAndFeelChange(); + if (svgPathWindow != nullptr) svgPathWindow->sendLookAndFeelChange(); + if (globalPreferencesWindow != nullptr) globalPreferencesWindow->sendLookAndFeelChange(); + if (aboutWindow != nullptr) aboutWindow->sendLookAndFeelChange(); + if (applicationUsageDataWindow != nullptr) applicationUsageDataWindow->sendLookAndFeelChange(); + + auto* mcm = ModalComponentManager::getInstance(); + for (auto i = 0; i < mcm->getNumModalComponents(); ++i) + mcm->getModalComponent (i)->sendLookAndFeelChange(); + + if (saveSetting) + { + auto& properties = settings->getGlobalProperties(); + properties.setValue ("COLOUR SCHEME", index); + } +} diff --git a/extras/Projucer/Source/Application/jucer_Application.h b/extras/Projucer/Source/Application/jucer_Application.h index c019958448..0d749612d0 100644 --- a/extras/Projucer/Source/Application/jucer_Application.h +++ b/extras/Projucer/Source/Application/jucer_Application.h @@ -148,4 +148,6 @@ private: void handleAsyncUpdate() override; void initCommandManager(); + + void setColourScheme (int index, bool saveSetting); }; diff --git a/extras/Projucer/Source/Application/jucer_AutoUpdater.cpp b/extras/Projucer/Source/Application/jucer_AutoUpdater.cpp index 623dc6df58..1b4e9e4076 100644 --- a/extras/Projucer/Source/Application/jucer_AutoUpdater.cpp +++ b/extras/Projucer/Source/Application/jucer_AutoUpdater.cpp @@ -264,7 +264,6 @@ public: addAndMakeVisible (cancelButton = new TextButton ("Cancel Button")); cancelButton->setButtonText (TRANS("Cancel")); cancelButton->addListener (this); - cancelButton->setColour (TextButton::buttonColourId, findColour (secondaryButtonBackgroundColourId)); addAndMakeVisible (changeLogLabel = new Label ("Change Log Label", TRANS("Release Notes:"))); @@ -303,6 +302,8 @@ public: BinaryData::juce_icon_pngSize); setSize (518, overwritePath ? 345 : 269); + + lookAndFeelChanged(); } ~UpdateUserDialog() @@ -394,6 +395,13 @@ private: ScopedPointer overwriteButton; ScopedPointer juceIcon; + void lookAndFeelChanged() override + { + cancelButton->setColour (TextButton::buttonColourId, + findColour (secondaryButtonBackgroundColourId)); + changeLog->applyFontToAllText (changeLog->getFont()); + } + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (UpdateUserDialog) }; diff --git a/extras/Projucer/Source/Application/jucer_GlobalPreferences.cpp b/extras/Projucer/Source/Application/jucer_GlobalPreferences.cpp index cc2676ddd1..2500916fd8 100644 --- a/extras/Projucer/Source/Application/jucer_GlobalPreferences.cpp +++ b/extras/Projucer/Source/Application/jucer_GlobalPreferences.cpp @@ -34,7 +34,7 @@ PathSettingsTab::PathSettingsTab (DependencyPathOS os) { const int maxChars = 1024; - StoredSettings& settings = getAppSettings(); + auto& settings = getAppSettings(); vst3PathComponent = pathComponents.add (new TextPropertyComponent (settings.getGlobalPath (Ids::vst3Path, os), "VST3 SDK", maxChars, false)); @@ -46,11 +46,11 @@ PathSettingsTab::PathSettingsTab (DependencyPathOS os) androidSdkPathComponent = pathComponents.add (new TextPropertyComponent (settings.getGlobalPath (Ids::androidSDKPath, os), "Android SDK", maxChars, false)); androidNdkPathComponent = pathComponents.add (new TextPropertyComponent (settings.getGlobalPath (Ids::androidNDKPath, os), "Android NDK", maxChars, false)); - for (TextPropertyComponent** component = pathComponents.begin(); component != pathComponents.end(); ++component) + for (auto component : pathComponents) { - addAndMakeVisible (**component); - (*component)->addListener (this); - textPropertyComponentChanged (*component); + addAndMakeVisible (component); + component->addListener (this); + textPropertyComponentChanged (component); } } @@ -60,9 +60,9 @@ PathSettingsTab::~PathSettingsTab() void PathSettingsTab::textPropertyComponentChanged (TextPropertyComponent* textPropertyComponent) { - Identifier keyName = getKeyForPropertyComponent (textPropertyComponent); + auto keyName = getKeyForPropertyComponent (textPropertyComponent); - Colour textColour = getAppSettings().isGlobalPathValid (File::getCurrentWorkingDirectory(), keyName, textPropertyComponent->getText()) + auto textColour = getAppSettings().isGlobalPathValid (File::getCurrentWorkingDirectory(), keyName, textPropertyComponent->getText()) ? findColour (widgetTextColourId) : Colours::red; @@ -96,13 +96,18 @@ void PathSettingsTab::resized() { const int componentHeight = 25; - for (TextPropertyComponent** component = pathComponents.begin(); component != pathComponents.end(); ++component) + for (auto component : pathComponents) { - const int elementNumber = pathComponents.indexOf (*component); - (*component)->setBounds (0, componentHeight * elementNumber, getWidth(), componentHeight); + const auto elementNumber = pathComponents.indexOf (component); + component->setBounds (10, componentHeight * elementNumber, getWidth() - 20, componentHeight); } } +void PathSettingsTab::lookAndFeelChanged() +{ + for (auto* comp : pathComponents) + textPropertyComponentChanged (comp); +} //============================================================================== struct AppearanceEditor @@ -124,7 +129,7 @@ struct AppearanceEditor g.setColour (findColour (defaultTextColourId)); g.drawFittedText ("Scanning for fonts..", getLocalBounds(), Justification::centred, 2); - const int size = 30; + const auto size = 30; getLookAndFeel().drawSpinningWaitAnimation (g, Colours::white, (getWidth() - size) / 2, getHeight() / 2 - 50, size, size); } @@ -136,7 +141,7 @@ struct AppearanceEditor { getAppSettings().monospacedFontNames = fontsFound; - if (AppearanceSettingsTab* tab = findParentComponentOfClass()) + if (auto* tab = findParentComponentOfClass()) tab->changeContent (new EditorPanel()); } else @@ -154,7 +159,7 @@ struct AppearanceEditor { const Font font (name, 20.0f, Font::plain); - const int width = font.getStringWidth ("...."); + const auto width = font.getStringWidth ("...."); return width == font.getStringWidth ("WWWW") && width == font.getStringWidth ("0000") @@ -185,14 +190,14 @@ struct AppearanceEditor void rebuildProperties() { - AppearanceSettings& scheme = getAppSettings().appearance; + auto& scheme = getAppSettings().appearance; Array props; - Value fontValue (scheme.getCodeFontValue()); + auto fontValue = scheme.getCodeFontValue(); props.add (FontNameValueSource::createProperty ("Code Editor Font", fontValue)); props.add (FontSizeValueSource::createProperty ("Font Size", fontValue)); - const StringArray colourNames (scheme.getColourNames()); + const auto colourNames = scheme.getColourNames(); for (int i = 0; i < colourNames.size(); ++i) props.add (new ColourPropertyComponent (nullptr, colourNames[i], @@ -205,8 +210,8 @@ struct AppearanceEditor void resized() override { - Rectangle r (getLocalBounds()); - panel.setBounds (r.removeFromTop (getHeight() - 28).reduced (4, 2)); + auto r = getLocalBounds(); + panel.setBounds (r.removeFromTop (getHeight() - 28).reduced (10, 2)); loadButton.setBounds (r.removeFromLeft (getWidth() / 2).reduced (10, 4)); saveButton.setBounds (r.reduced (10, 3)); } @@ -249,6 +254,12 @@ struct AppearanceEditor rebuildProperties(); } + void lookAndFeelChanged() override + { + loadButton.setColour (TextButton::buttonColourId, + findColour (secondaryButtonBackgroundColourId)); + } + JUCE_DECLARE_NON_COPYABLE (EditorPanel) }; @@ -264,7 +275,7 @@ struct AppearanceEditor void setValue (const var& newValue) override { - Font font (Font::fromString (sourceValue.toString())); + auto font = Font::fromString (sourceValue.toString()); font.setTypefaceName (newValue.toString().isEmpty() ? Font::getDefaultMonospacedFontName() : newValue.toString()); sourceValue = font.toString(); @@ -272,7 +283,7 @@ struct AppearanceEditor static ChoicePropertyComponent* createProperty (const String& title, const Value& value) { - StringArray fontNames = getAppSettings().monospacedFontNames; + auto fontNames = getAppSettings().monospacedFontNames; Array values; values.add (Font::getDefaultMonospacedFontName()); @@ -321,7 +332,7 @@ void AppearanceSettings::showGlobalPreferences (ScopedPointer& ownerP else new FloatingToolWindow ("Preferences", "globalPreferencesEditorPos", - new GlobalPreferencesComponent, + new GlobalPreferencesComponent(), ownerPointer, false, 500, 500, 500, 500, 500, 500); } @@ -369,3 +380,14 @@ GlobalPreferencesComponent::GlobalPreferencesComponent() for (GlobalPreferencesTab** tab = preferenceTabs.begin(); tab != preferenceTabs.end(); ++tab) addTab ((*tab)->getName(), findColour (backgroundColourId, true), (*tab)->getContent(), true); } + +void GlobalPreferencesComponent::paint (Graphics& g) +{ + g.fillAll (findColour (backgroundColourId)); +} + +void GlobalPreferencesComponent::lookAndFeelChanged() +{ + for (auto* tab : preferenceTabs) + tab->getContent()->sendLookAndFeelChange(); +} diff --git a/extras/Projucer/Source/Application/jucer_GlobalPreferences.h b/extras/Projucer/Source/Application/jucer_GlobalPreferences.h index e82adf4a69..e86d805daf 100644 --- a/extras/Projucer/Source/Application/jucer_GlobalPreferences.h +++ b/extras/Projucer/Source/Application/jucer_GlobalPreferences.h @@ -63,6 +63,8 @@ private: Identifier getKeyForPropertyComponent (TextPropertyComponent*) const; + void lookAndFeelChanged() override; + OwnedArray pathComponents; TextPropertyComponent* vst3PathComponent; @@ -103,8 +105,11 @@ class GlobalPreferencesComponent : public TabbedComponent { public: GlobalPreferencesComponent(); + void paint (Graphics&) override; private: + void lookAndFeelChanged() override; + OwnedArray preferenceTabs; JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (GlobalPreferencesComponent) diff --git a/extras/Projucer/Source/ComponentEditor/properties/jucer_PositionPropertyBase.h b/extras/Projucer/Source/ComponentEditor/properties/jucer_PositionPropertyBase.h index bd35879449..55554be5b2 100644 --- a/extras/Projucer/Source/ComponentEditor/properties/jucer_PositionPropertyBase.h +++ b/extras/Projucer/Source/ComponentEditor/properties/jucer_PositionPropertyBase.h @@ -419,17 +419,10 @@ protected: owner (owner_) { setEditable (true, true, false); - - setColour (backgroundColourId, Colours::white); - setColour (textColourId, Colours::black); - setColour (outlineColourId, findColour (ComboBox::outlineColourId)); - - setColour (TextEditor::textColourId, Colours::black); - setColour (TextEditor::backgroundColourId, Colours::white); - setColour (TextEditor::outlineColourId, findColour (ComboBox::outlineColourId)); + lookAndFeelChanged(); } - TextEditor* createEditorComponent() + TextEditor* createEditorComponent() override { TextEditor* ed = Label::createEditorComponent(); ed->setInputRestrictions (14, "0123456789.-%"); @@ -437,10 +430,16 @@ protected: return ed; } - void textWasEdited() + void textWasEdited() override { owner.textWasEdited(); } + + void lookAndFeelChanged() override + { + setColour (backgroundColourId, findColour (widgetBackgroundColourId)); + setColour (textColourId, findColour (widgetTextColourId)); + } }; ComponentLayout* layout; diff --git a/extras/Projucer/Source/ComponentEditor/ui/jucer_JucerDocumentEditor.cpp b/extras/Projucer/Source/ComponentEditor/ui/jucer_JucerDocumentEditor.cpp index 3bbefd013d..010fb0be7e 100644 --- a/extras/Projucer/Source/ComponentEditor/ui/jucer_JucerDocumentEditor.cpp +++ b/extras/Projucer/Source/ComponentEditor/ui/jucer_JucerDocumentEditor.cpp @@ -71,9 +71,15 @@ public: return; if (rowIsSelected) + { g.fillAll (findColour (TextEditor::highlightColourId)); + g.setColour (findColour (defaultHighlightedTextColourId)); + } + else + { + g.setColour (findColour (defaultTextColourId)); + } - g.setColour (findColour (defaultTextColourId)); g.setFont (height * 0.6f); g.drawText (returnValues [row] + " " + baseClasses [row] + "::" + methods [row], 30, 0, width - 32, height, diff --git a/extras/Projucer/Source/ComponentEditor/ui/jucer_ResourceEditorPanel.cpp b/extras/Projucer/Source/ComponentEditor/ui/jucer_ResourceEditorPanel.cpp index e320df9c3e..84a3f7a7f7 100644 --- a/extras/Projucer/Source/ComponentEditor/ui/jucer_ResourceEditorPanel.cpp +++ b/extras/Projucer/Source/ComponentEditor/ui/jucer_ResourceEditorPanel.cpp @@ -93,13 +93,13 @@ ResourceEditorPanel::ResourceEditorPanel (JucerDocument& doc) listBox->getHeader().addColumn ("reload", 4, 100, 100, 100, TableHeaderComponent::notResizableOrSortable); listBox->getHeader().setStretchToFitActive (true); - listBox->setColour (ListBox::backgroundColourId, findColour (secondaryBackgroundColourId)); - listBox->setColour (ListBox::outlineColourId, Colours::transparentBlack); listBox->setOutlineThickness (1); listBox->updateContent(); document.addChangeListener (this); handleCommandMessage (1); + + lookAndFeelChanged(); } ResourceEditorPanel::~ResourceEditorPanel() @@ -120,7 +120,7 @@ void ResourceEditorPanel::paintRowBackground (Graphics& g, int /*rowNumber*/, } void ResourceEditorPanel::paintCell (Graphics& g, int rowNumber, int columnId, int width, int height, - bool /*rowIsSelected*/) + bool rowIsSelected) { if (const BinaryResources::BinaryResource* const r = document.getResources() [rowNumber]) { @@ -133,6 +133,11 @@ void ResourceEditorPanel::paintCell (Graphics& g, int rowNumber, int columnId, i else if (columnId == 3) text = File::descriptionOfSizeInBytes ((int64) r->data.getSize()); + if (rowIsSelected) + g.setColour (findColour (defaultHighlightedTextColourId)); + else + g.setColour (findColour (defaultTextColourId)); + g.setFont (13.0f); g.drawText (text, 4, 0, width - 6, height, Justification::centredLeft, true); } @@ -179,6 +184,12 @@ int ResourceEditorPanel::getColumnAutoSizeWidth (int columnId) return widest + 10; } +void ResourceEditorPanel::lookAndFeelChanged() +{ + listBox->setColour (ListBox::backgroundColourId, findColour (secondaryBackgroundColourId)); + listBox->setColour (ListBox::outlineColourId, Colours::transparentBlack); +} + //============================================================================== class ResourceSorter { diff --git a/extras/Projucer/Source/ComponentEditor/ui/jucer_ResourceEditorPanel.h b/extras/Projucer/Source/ComponentEditor/ui/jucer_ResourceEditorPanel.h index 366631979a..fc862adee1 100644 --- a/extras/Projucer/Source/ComponentEditor/ui/jucer_ResourceEditorPanel.h +++ b/extras/Projucer/Source/ComponentEditor/ui/jucer_ResourceEditorPanel.h @@ -53,6 +53,8 @@ public: void selectedRowsChanged (int lastRowSelected) override; private: + void lookAndFeelChanged() override; + JucerDocument& document; ScopedPointer listBox; TextButton addButton, reloadAllButton, delButton; diff --git a/extras/Projucer/Source/Project Saving/jucer_TextWithDefaultPropertyComponent.h b/extras/Projucer/Source/Project Saving/jucer_TextWithDefaultPropertyComponent.h index 079811aa13..5c32936149 100644 --- a/extras/Projucer/Source/Project Saving/jucer_TextWithDefaultPropertyComponent.h +++ b/extras/Projucer/Source/Project Saving/jucer_TextWithDefaultPropertyComponent.h @@ -123,9 +123,9 @@ public: void refresh() override { if (cachedValue.isUsingDefault()) - setColour (textColourId, Colours::grey); + setColour (textColourId, findColour (widgetTextColourId).withMultipliedAlpha (0.5f)); else - setColour (textColourId, Colours::black); + setColour (textColourId, findColour (widgetTextColourId)); textEditor->setText (getText(), dontSendNotification); } @@ -164,5 +164,7 @@ private: void editorHidden (Label*, TextEditor&) override {} + void lookAndFeelChanged() override { refresh(); } + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (TextWithDefaultPropertyComponent) }; diff --git a/extras/Projucer/Source/Project/jucer_DependencyPathPropertyComponent.cpp b/extras/Projucer/Source/Project/jucer_DependencyPathPropertyComponent.cpp index 6ea7fc559e..5dc2f9a675 100644 --- a/extras/Projucer/Source/Project/jucer_DependencyPathPropertyComponent.cpp +++ b/extras/Projucer/Source/Project/jucer_DependencyPathPropertyComponent.cpp @@ -77,12 +77,13 @@ try : TextPropertyComponent (propertyName, 1024, false), getValue().setValue (String()); getValue().addListener (this); - setColour (textColourId, getTextColourToDisplay()); if (Label* label = dynamic_cast (getChildComponent (0))) label->addListener (this); else jassertfalse; + + lookAndFeelChanged(); } catch (const std::bad_cast&) { @@ -109,10 +110,10 @@ void DependencyPathPropertyComponent::textWasEdited() Colour DependencyPathPropertyComponent::getTextColourToDisplay() const { if (! pathValueSource.isUsingProjectSettings()) - return pathValueSource.isValidPath (pathRelativeTo) ? Colours::grey - : Colours::lightpink; + return pathValueSource.isValidPath (pathRelativeTo) ? findColour (widgetTextColourId).withMultipliedAlpha (0.5f) + : Colours::red.withMultipliedAlpha (0.5f); - return pathValueSource.isValidPath (pathRelativeTo) ? Colours::black + return pathValueSource.isValidPath (pathRelativeTo) ? findColour (widgetTextColourId) : Colours::red; } @@ -129,3 +130,8 @@ void DependencyPathPropertyComponent::editorShown (Label* /*label*/, TextEditor& void DependencyPathPropertyComponent::editorHidden (Label*, TextEditor&) { } + +void DependencyPathPropertyComponent::lookAndFeelChanged() +{ + textWasEdited(); +} diff --git a/extras/Projucer/Source/Project/jucer_DependencyPathPropertyComponent.h b/extras/Projucer/Source/Project/jucer_DependencyPathPropertyComponent.h index 92851bfa8e..dfbba807ea 100644 --- a/extras/Projucer/Source/Project/jucer_DependencyPathPropertyComponent.h +++ b/extras/Projucer/Source/Project/jucer_DependencyPathPropertyComponent.h @@ -177,5 +177,7 @@ private: void editorShown (Label*, TextEditor&) override; void editorHidden (Label*, TextEditor&) override; + void lookAndFeelChanged() override; + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (DependencyPathPropertyComponent) }; diff --git a/extras/Projucer/Source/Utility/jucer_ProjucerLookAndFeel.cpp b/extras/Projucer/Source/Utility/jucer_ProjucerLookAndFeel.cpp index 9094e69bd7..ac4354af3b 100644 --- a/extras/Projucer/Source/Utility/jucer_ProjucerLookAndFeel.cpp +++ b/extras/Projucer/Source/Utility/jucer_ProjucerLookAndFeel.cpp @@ -554,7 +554,7 @@ void ProjucerLookAndFeel::setupColours() } setColour (Label::textColourId, findColour (defaultTextColourId)); - setColour (Label::textColourId, findColour (defaultTextColourId)); + setColour (Label::textWhenEditingColourId, findColour (widgetTextColourId)); setColour (TextEditor::highlightColourId, findColour (defaultHighlightColourId)); setColour (TextEditor::highlightedTextColourId, findColour (defaultHighlightedTextColourId)); setColour (TextEditor::outlineColourId, Colours::transparentBlack);