Browse Source

Projucer: Update PIP creator window colours when colour scheme changes

tags/2021-05-28
ed 6 years ago
parent
commit
fef1093f6e
3 changed files with 16 additions and 3 deletions
  1. +7
    -1
      extras/Projucer/Source/Application/Windows/jucer_PIPCreatorWindowComponent.h
  2. +2
    -2
      extras/Projucer/Source/Utility/UI/jucer_ProjucerLookAndFeel.cpp
  3. +7
    -0
      extras/Projucer/Source/Utility/UI/jucer_ProjucerLookAndFeel.h

+ 7
- 1
extras/Projucer/Source/Application/Windows/jucer_PIPCreatorWindowComponent.h View File

@@ -113,6 +113,12 @@ private:
}
};
void lookAndFeelChanged() override
{
lf->setColourScheme (ProjucerApplication::getApp().lookAndFeel.getCurrentColourScheme());
lf->setupColours();
}
//==============================================================================
void buildProps()
{
@@ -317,7 +323,7 @@ private:
mainClassValue { pipTree, Ids::mainClass, nullptr, "MyComponent" },
useLocalCopyValue { pipTree, Ids::useLocalCopy, nullptr, false };
std::unique_ptr<LookAndFeel> lf;
std::unique_ptr<PIPCreatorLookAndFeel> lf;
Viewport propertyViewport;
PropertyGroupComponent propertyGroup { "PIP Creator", { getIcons().juceLogo, Colours::transparentBlack } };


+ 2
- 2
extras/Projucer/Source/Utility/UI/jucer_ProjucerLookAndFeel.cpp View File

@@ -481,7 +481,7 @@ void ProjucerLookAndFeel::setupColours()
{
auto& colourScheme = getCurrentColourScheme();
if (colourScheme == getDarkColourScheme())
if (colourScheme == getDarkColourScheme() || colourScheme == getProjucerDarkColourScheme())
{
setColour (backgroundColourId, Colour (0xff323e44));
setColour (secondaryBackgroundColourId, Colour (0xff263238));
@@ -502,7 +502,7 @@ void ProjucerLookAndFeel::setupColours()
setColour (widgetBackgroundColourId, Colour (0xff495358));
setColour (secondaryWidgetBackgroundColourId, Colour (0xff303b41));
colourScheme.setUIColour (LookAndFeel_V4::ColourScheme::UIColour::defaultFill, Colour (0xffa45c94));
colourScheme = getProjucerDarkColourScheme();
}
else if (colourScheme == getGreyColourScheme())
{


+ 7
- 0
extras/Projucer/Source/Utility/UI/jucer_ProjucerLookAndFeel.h View File

@@ -85,6 +85,13 @@ public:
static Font getPropertyComponentFont() { return { 14.0f, Font::FontStyleFlags::bold }; }
static int getTextWidthForPropertyComponent (PropertyComponent* pp) { return jmin (200, pp->getWidth() / 2); }
static ColourScheme getProjucerDarkColourScheme()
{
return { 0xff323e44, 0xff263238, 0xff323e44,
0xff8e989b, 0xffffffff, 0xffa45c94,
0xffffffff, 0xff181f22, 0xffffffff };
}
//==============================================================================
void setupColours();


Loading…
Cancel
Save