Browse Source

Added DrawableButton::textColourOnId

tags/2021-05-28
jules 12 years ago
parent
commit
0ee5dbf91d
3 changed files with 6 additions and 4 deletions
  1. +2
    -1
      modules/juce_gui_basics/buttons/juce_DrawableButton.cpp
  2. +2
    -1
      modules/juce_gui_basics/buttons/juce_DrawableButton.h
  3. +2
    -2
      modules/juce_gui_basics/lookandfeel/juce_LookAndFeel.cpp

+ 2
- 1
modules/juce_gui_basics/buttons/juce_DrawableButton.cpp 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(),


+ 2
- 1
modules/juce_gui_basics/buttons/juce_DrawableButton.h 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


+ 2
- 2
modules/juce_gui_basics/lookandfeel/juce_LookAndFeel.cpp 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)


Loading…
Cancel
Save