| @@ -43932,7 +43932,9 @@ void DrawableButton::paintButton (Graphics& g, | |||||
| { | { | ||||
| g.setFont ((float) textH); | g.setFont ((float) textH); | ||||
| g.setColour (Colours::black.withAlpha (isEnabled() ? 1.0f : 0.4f)); | |||||
| g.setColour (getLookAndFeel().findColour (DrawableButton::textColourId) | |||||
| .withMultipliedAlpha (isEnabled() ? 1.0f : 0.4f)); | |||||
| g.drawFittedText (getButtonText(), | g.drawFittedText (getButtonText(), | ||||
| 2, getHeight() - textH - 1, | 2, getHeight() - textH - 1, | ||||
| getWidth() - 4, textH, | getWidth() - 4, textH, | ||||
| @@ -60696,9 +60698,10 @@ const KeyPress KeyPress::createFromDescription (const String& desc) | |||||
| if (key == 0) | if (key == 0) | ||||
| { | { | ||||
| // see if it's a function key.. | // see if it's a function key.. | ||||
| for (int i = 1; i <= 12; ++i) | |||||
| if (desc.containsWholeWordIgnoreCase ("f" + String (i))) | |||||
| key = F1Key + i - 1; | |||||
| if (! desc.containsChar ('#')) // avoid mistaking hex-codes like "#f1" | |||||
| for (int i = 1; i <= 12; ++i) | |||||
| if (desc.containsWholeWordIgnoreCase ("f" + String (i))) | |||||
| key = F1Key + i - 1; | |||||
| if (key == 0) | if (key == 0) | ||||
| { | { | ||||
| @@ -64955,6 +64958,8 @@ 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) | ||||
| @@ -43832,6 +43832,18 @@ public: | |||||
| const Drawable* getOverImage() const throw(); | const Drawable* getOverImage() const throw(); | ||||
| const Drawable* getDownImage() const throw(); | const Drawable* getDownImage() const throw(); | ||||
| /** A set of colour IDs to use to change the colour of various aspects of the link. | |||||
| 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 | |||||
| { | |||||
| textColourId = 0x1004010, /**< The colour to use for the URL text. */ | |||||
| }; | |||||
| juce_UseDebuggingNewOperator | juce_UseDebuggingNewOperator | ||||
| protected: | protected: | ||||
| @@ -173,7 +173,9 @@ void DrawableButton::paintButton (Graphics& g, | |||||
| { | { | ||||
| g.setFont ((float) textH); | g.setFont ((float) textH); | ||||
| g.setColour (Colours::black.withAlpha (isEnabled() ? 1.0f : 0.4f)); | |||||
| g.setColour (getLookAndFeel().findColour (DrawableButton::textColourId) | |||||
| .withMultipliedAlpha (isEnabled() ? 1.0f : 0.4f)); | |||||
| g.drawFittedText (getButtonText(), | g.drawFittedText (getButtonText(), | ||||
| 2, getHeight() - textH - 1, | 2, getHeight() - textH - 1, | ||||
| getWidth() - 4, textH, | getWidth() - 4, textH, | ||||
| @@ -153,6 +153,19 @@ public: | |||||
| const Drawable* getOverImage() const throw(); | const Drawable* getOverImage() const throw(); | ||||
| const Drawable* getDownImage() const throw(); | const Drawable* getDownImage() const throw(); | ||||
| //============================================================================== | |||||
| /** A set of colour IDs to use to change the colour of various aspects of the link. | |||||
| 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 | |||||
| { | |||||
| textColourId = 0x1004010, /**< The colour to use for the URL text. */ | |||||
| }; | |||||
| //============================================================================== | //============================================================================== | ||||
| juce_UseDebuggingNewOperator | juce_UseDebuggingNewOperator | ||||
| @@ -193,9 +193,10 @@ const KeyPress KeyPress::createFromDescription (const String& desc) | |||||
| if (key == 0) | if (key == 0) | ||||
| { | { | ||||
| // see if it's a function key.. | // see if it's a function key.. | ||||
| for (int i = 1; i <= 12; ++i) | |||||
| if (desc.containsWholeWordIgnoreCase ("f" + String (i))) | |||||
| key = F1Key + i - 1; | |||||
| if (! desc.containsChar ('#')) // avoid mistaking hex-codes like "#f1" | |||||
| for (int i = 1; i <= 12; ++i) | |||||
| if (desc.containsWholeWordIgnoreCase ("f" + String (i))) | |||||
| key = F1Key + i - 1; | |||||
| if (key == 0) | if (key == 0) | ||||
| { | { | ||||
| @@ -221,6 +221,8 @@ 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) | ||||