mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-11 23:54:18 +00:00
Projucer: Selected colour scheme is now stored and recalled. Multiple fixes for unreadable text in the GUI editor
This commit is contained in:
parent
359238f0ed
commit
cf0e97fcc7
13 changed files with 151 additions and 69 deletions
|
|
@ -77,12 +77,13 @@ try : TextPropertyComponent (propertyName, 1024, false),
|
|||
getValue().setValue (String());
|
||||
|
||||
getValue().addListener (this);
|
||||
setColour (textColourId, getTextColourToDisplay());
|
||||
|
||||
if (Label* label = dynamic_cast<Label*> (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();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue