1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Added DrawableButton::textColourOnId

This commit is contained in:
jules 2013-01-22 17:01:39 +00:00
parent 24667e7f48
commit 0ee5dbf91d
3 changed files with 6 additions and 4 deletions

View file

@ -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(),

View file

@ -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

View file

@ -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)