Browse Source

Introjucer: fix for broken colour scheme when run for the first time.

tags/2021-05-28
jules 13 years ago
parent
commit
c2666bfe61
4 changed files with 9 additions and 7 deletions
  1. +4
    -3
      extras/Introjucer/Source/Application/jucer_AppearanceSettings.cpp
  2. +1
    -1
      extras/Introjucer/Source/Application/jucer_AppearanceSettings.h
  3. +2
    -2
      extras/Introjucer/Source/Project/jucer_ProjectContentComponent.cpp
  4. +2
    -1
      extras/Introjucer/Source/Utility/jucer_StoredSettings.cpp

+ 4
- 3
extras/Introjucer/Source/Application/jucer_AppearanceSettings.cpp View File

@@ -51,7 +51,7 @@ namespace AppearanceColours
}
//==============================================================================
AppearanceSettings::AppearanceSettings()
AppearanceSettings::AppearanceSettings (bool updateAppWhenChanged)
: settings ("COLOUR_SCHEME")
{
IntrojucerLookAndFeel lf;
@@ -73,7 +73,8 @@ AppearanceSettings::AppearanceSettings()
getCodeFontValue() = getDefaultCodeFont().toString();
settings.addListener (this);
if (updateAppWhenChanged)
settings.addListener (this);
}
File AppearanceSettings::getSchemesFolder()
@@ -89,7 +90,7 @@ void AppearanceSettings::writeDefaultSchemeFile (const String& xmlString, const
if (! file.exists())
{
AppearanceSettings settings;
AppearanceSettings settings (false);
ScopedPointer<XmlElement> xml (XmlDocument::parse (xmlString));
if (xml != nullptr)


+ 1
- 1
extras/Introjucer/Source/Application/jucer_AppearanceSettings.h View File

@@ -30,7 +30,7 @@
class AppearanceSettings : private ValueTree::Listener
{
public:
AppearanceSettings();
AppearanceSettings (bool updateAppWhenChanged);
bool readFromFile (const File& file);
bool readFromXML (const XmlElement&);


+ 2
- 2
extras/Introjucer/Source/Project/jucer_ProjectContentComponent.cpp View File

@@ -122,10 +122,10 @@ void ProjectContentComponent::paint (Graphics& g)
void ProjectContentComponent::paintOverChildren (Graphics& g)
{
if (contentView != nullptr)
if (resizerBar != nullptr)
{
const int shadowSize = 15;
const int x = contentView->getX();
const int x = resizerBar->getRight();
ColourGradient cg (Colours::black.withAlpha (0.25f), (float) x, 0,
Colours::transparentBlack, (float) (x - shadowSize), 0, false);


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

@@ -40,6 +40,7 @@ PropertiesFile& getAppProperties()
//==============================================================================
StoredSettings::StoredSettings()
: appearance (true)
{
}
@@ -91,7 +92,7 @@ void StoredSettings::reload()
{
// These settings are used in defining the properties file's location.
PropertiesFile::Options options;
options.applicationName = "Introjucer";
options.applicationName = "IntrojucerXXX";
options.folderName = "Introjucer";
options.filenameSuffix = "settings";
options.osxLibrarySubFolder = "Application Support";


Loading…
Cancel
Save