Browse Source

Introjucer: more colour scheme stuff.

tags/2021-05-28
jules 13 years ago
parent
commit
edb1114c5e
2 changed files with 17 additions and 11 deletions
  1. +16
    -10
      extras/Introjucer/Source/Application/jucer_AppearanceSettings.cpp
  2. +1
    -1
      extras/Introjucer/Source/Utility/jucer_JucerTreeViewBase.cpp

+ 16
- 10
extras/Introjucer/Source/Application/jucer_AppearanceSettings.cpp View File

@@ -37,16 +37,16 @@ namespace AppearanceColours
static const ColourInfo colours[] =
{
{ "Main Window Bkgd", mainBackgroundColourId, true },
{ "Project Panel Bkgd", projectPanelBackgroundColourId, true },
{ "Treeview Highlight", treeviewHighlightColourId, false },
{ "Code Background", CodeEditorComponent::backgroundColourId, true },
{ "Line Number Bkgd", CodeEditorComponent::lineNumberBackgroundId, false },
{ "Line Numbers", CodeEditorComponent::lineNumberTextId, false },
{ "Plain Text", CodeEditorComponent::defaultTextColourId, false },
{ "Selected Text Bkgd", CodeEditorComponent::highlightColourId, false },
{ "Caret", CaretComponent::caretColourId, false },
{ "Main Window Bkgd", mainBackgroundColourId, true },
{ "Project Panel Bkgd", projectPanelBackgroundColourId, true },
{ "Treeview Highlight", treeviewHighlightColourId, false }
{ "Caret", CaretComponent::caretColourId, false }
};
}
@@ -120,16 +120,22 @@ bool AppearanceSettings::readFromXML (const XmlElement& xml)
{
if (xml.hasTagName (settings.getType().toString()))
{
ValueTree newSettings (ValueTree::fromXml (xml));
const ValueTree newSettings (ValueTree::fromXml (xml));
// we'll manually copy across the new properties to the existing tree so that
// any open editors will be kept up to date..
settings.copyPropertiesFrom (newSettings, nullptr);
for (int i = settings.getNumChildren(); --i >= 0;)
{
const ValueTree c (settings.getChild (i));
if (! newSettings.getChildWithProperty (Ids::name, c.getProperty (Ids::name)).isValid())
newSettings.addChild (c.createCopy(), 0, nullptr);
ValueTree c (settings.getChild (i));
const ValueTree newValue (newSettings.getChildWithProperty (Ids::name, c.getProperty (Ids::name)));
if (newValue.isValid())
c.copyPropertiesFrom (newValue, nullptr);
}
settings = newSettings;
return true;
}


+ 1
- 1
extras/Introjucer/Source/Utility/jucer_JucerTreeViewBase.cpp View File

@@ -66,7 +66,7 @@ void JucerTreeViewBase::paintOpenCloseButton (Graphics& g, int width, int height
else
p.addTriangle (width * 0.25f, height * 0.25f, width * 0.8f, height * 0.5f, width * 0.25f, height * 0.75f);
g.setColour (getContrastingColour (0.3f));
g.setColour (getOwnerView()->findColour (projectPanelBackgroundColourId).contrasting (0.3f));
g.fillPath (p);
}


Loading…
Cancel
Save