@@ -197,7 +197,8 @@ void DrawableButton::paintButton (Graphics& g, | |||||
{ | { | ||||
g.setFont ((float) textH); | g.setFont ((float) textH); | ||||
g.setColour (findColour (DrawableButton::textColourId) | |||||
g.setColour (findColour (getToggleState() ? DrawableButton::textColourOnId | |||||
: DrawableButton::textColourId) | |||||
.withMultipliedAlpha (isEnabled() ? 1.0f : 0.4f)); | .withMultipliedAlpha (isEnabled() ? 1.0f : 0.4f)); | ||||
g.drawFittedText (getButtonText(), | g.drawFittedText (getButtonText(), | ||||
@@ -146,7 +146,8 @@ public: | |||||
*/ | */ | ||||
enum ColourIds | 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 | backgroundColourId = 0x1004011, /**< The colour used to fill the button's background (when | ||||
the button is toggled 'off'). Note that if you use the | the button is toggled 'off'). Note that if you use the | ||||
@@ -165,6 +165,8 @@ LookAndFeel::LookAndFeel() | |||||
Toolbar::labelTextColourId, 0xff000000, | Toolbar::labelTextColourId, 0xff000000, | ||||
Toolbar::editingModeOutlineColourId, 0xffff0000, | Toolbar::editingModeOutlineColourId, 0xffff0000, | ||||
DrawableButton::textColourId, 0xff000000, | |||||
DrawableButton::textColourOnId, 0xff000000, | |||||
DrawableButton::backgroundColourId, 0x00000000, | DrawableButton::backgroundColourId, 0x00000000, | ||||
DrawableButton::backgroundOnColourId, 0xaabbbbff, | DrawableButton::backgroundOnColourId, 0xaabbbbff, | ||||
@@ -206,8 +208,6 @@ LookAndFeel::LookAndFeel() | |||||
FileSearchPathListComponent::backgroundColourId, 0xffffffff, | FileSearchPathListComponent::backgroundColourId, 0xffffffff, | ||||
FileChooserDialogBox::titleTextColourId, 0xff000000, | FileChooserDialogBox::titleTextColourId, 0xff000000, | ||||
DrawableButton::textColourId, 0xff000000, | |||||
}; | }; | ||||
for (int i = 0; i < numElementsInArray (standardColours); i += 2) | for (int i = 0; i < numElementsInArray (standardColours); i += 2) | ||||