diff --git a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp index 749db356b1..4135afe3e6 100644 --- a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp +++ b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp @@ -111,6 +111,9 @@ LookAndFeel_V2::LookAndFeel_V2() TextPropertyComponent::textColourId, 0xff000000, TextPropertyComponent::outlineColourId, standardOutlineColour, + BooleanPropertyComponent::backgroundColourId, 0xffffffff, + BooleanPropertyComponent::outlineColourId, standardOutlineColour, + ListBox::backgroundColourId, 0xffffffff, ListBox::outlineColourId, standardOutlineColour, ListBox::textColourId, 0xff000000, diff --git a/modules/juce_gui_basics/properties/juce_BooleanPropertyComponent.cpp b/modules/juce_gui_basics/properties/juce_BooleanPropertyComponent.cpp index 6f0d458806..bb85a19906 100644 --- a/modules/juce_gui_basics/properties/juce_BooleanPropertyComponent.cpp +++ b/modules/juce_gui_basics/properties/juce_BooleanPropertyComponent.cpp @@ -66,7 +66,7 @@ void BooleanPropertyComponent::paint (Graphics& g) { PropertyComponent::paint (g); - g.setColour (Colours::white); + g.setColour (findColour (backgroundColourId)); g.fillRect (button.getBounds()); g.setColour (findColour (ComboBox::outlineColourId)); diff --git a/modules/juce_gui_basics/properties/juce_BooleanPropertyComponent.h b/modules/juce_gui_basics/properties/juce_BooleanPropertyComponent.h index d791cf0ccf..066c9526f4 100644 --- a/modules/juce_gui_basics/properties/juce_BooleanPropertyComponent.h +++ b/modules/juce_gui_basics/properties/juce_BooleanPropertyComponent.h @@ -78,6 +78,20 @@ public: /** Must return the current value of the property. */ virtual bool getState() const; + //============================================================================== + /** A set of colour IDs to use to change the colour of various aspects of the component. + + These constants can be used either via the Component::setColour(), or LookAndFeel::setColour() + methods. + + @see Component::setColour, Component::findColour, LookAndFeel::setColour, LookAndFeel::findColour + */ + enum ColourIds + { + backgroundColourId = 0x100e801, /**< The colour to fill the background of the button area. */ + outlineColourId = 0x100e803, /**< The colour to use to draw an outline around the text area. */ + }; + //============================================================================== /** @internal */ void paint (Graphics&) override;