diff --git a/modules/juce_gui_basics/buttons/juce_DrawableButton.cpp b/modules/juce_gui_basics/buttons/juce_DrawableButton.cpp index 687d1efa19..fda20519fc 100644 --- a/modules/juce_gui_basics/buttons/juce_DrawableButton.cpp +++ b/modules/juce_gui_basics/buttons/juce_DrawableButton.cpp @@ -197,7 +197,8 @@ void DrawableButton::paintButton (Graphics& g, { g.setFont ((float) textH); - g.setColour (findColour (DrawableButton::textColourId) + g.setColour (findColour (getToggleState() ? DrawableButton::textColourOnId + : DrawableButton::textColourId) .withMultipliedAlpha (isEnabled() ? 1.0f : 0.4f)); g.drawFittedText (getButtonText(), diff --git a/modules/juce_gui_basics/buttons/juce_DrawableButton.h b/modules/juce_gui_basics/buttons/juce_DrawableButton.h index dc2da26741..68b9a3604b 100644 --- a/modules/juce_gui_basics/buttons/juce_DrawableButton.h +++ b/modules/juce_gui_basics/buttons/juce_DrawableButton.h @@ -146,7 +146,8 @@ public: */ enum ColourIds { - textColourId = 0x1004010, /**< The colour to use for the button's text label. */ + textColourId = 0x1004010, /**< The colour to use for the button's text label. */ + textColourOnId = 0x1004013, /**< The colour to use for the button's text.when the button's toggle state is "on". */ backgroundColourId = 0x1004011, /**< The colour used to fill the button's background (when the button is toggled 'off'). Note that if you use the diff --git a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel.cpp b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel.cpp index a29c1a62d4..74478f00f8 100644 --- a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel.cpp +++ b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel.cpp @@ -165,6 +165,8 @@ LookAndFeel::LookAndFeel() Toolbar::labelTextColourId, 0xff000000, Toolbar::editingModeOutlineColourId, 0xffff0000, + DrawableButton::textColourId, 0xff000000, + DrawableButton::textColourOnId, 0xff000000, DrawableButton::backgroundColourId, 0x00000000, DrawableButton::backgroundOnColourId, 0xaabbbbff, @@ -206,8 +208,6 @@ LookAndFeel::LookAndFeel() FileSearchPathListComponent::backgroundColourId, 0xffffffff, FileChooserDialogBox::titleTextColourId, 0xff000000, - - DrawableButton::textColourId, 0xff000000, }; for (int i = 0; i < numElementsInArray (standardColours); i += 2)