mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-19 01:04:20 +00:00
Projucer: Update PIP creator window colours when colour scheme changes
This commit is contained in:
parent
4985df9b5d
commit
fef1093f6e
3 changed files with 16 additions and 3 deletions
|
|
@ -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 } };
|
||||
|
|
|
|||
|
|
@ -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())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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…
Add table
Add a link
Reference in a new issue