diff --git a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp index ab48376e51..1c72ddd772 100644 --- a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp +++ b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp @@ -112,6 +112,7 @@ LookAndFeel_V2::LookAndFeel_V2() ComboBox::textColourId, 0xff000000, ComboBox::backgroundColourId, 0xffffffff, ComboBox::arrowColourId, 0x99000000, + ComboBox::focusedOutlineColourId, 0xffbbbbff, PropertyComponent::backgroundColourId, 0x66ffffff, PropertyComponent::labelTextColourId, 0xff000000, @@ -1167,7 +1168,7 @@ void LookAndFeel_V2::drawComboBox (Graphics& g, int width, int height, const boo if (box.isEnabled() && box.hasKeyboardFocus (false)) { - g.setColour (box.findColour (ComboBox::buttonColourId)); + g.setColour (box.findColour (ComboBox::focusedOutlineColourId)); g.drawRect (0, 0, width, height, 2); } else diff --git a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V3.cpp b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V3.cpp index d48331bf3f..5ff181a10e 100644 --- a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V3.cpp +++ b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V3.cpp @@ -35,6 +35,7 @@ LookAndFeel_V3::LookAndFeel_V3() setColour (TextButton::buttonColourId, textButtonColour); setColour (TextButton::buttonOnColourId, Colour (0xff888888)); setColour (ComboBox::buttonColourId, textButtonColour); + setColour (ComboBox::focusedOutlineColourId, textButtonColour); setColour (TextEditor::outlineColourId, Colours::transparentBlack); setColour (TabbedButtonBar::tabOutlineColourId, Colour (0x66000000)); setColour (TabbedComponent::outlineColourId, Colour (0x66000000)); @@ -357,11 +358,9 @@ void LookAndFeel_V3::drawComboBox (Graphics& g, int width, int height, const boo { g.fillAll (box.findColour (ComboBox::backgroundColourId)); - const Colour buttonColour (box.findColour (ComboBox::buttonColourId)); - if (box.isEnabled() && box.hasKeyboardFocus (false)) { - g.setColour (buttonColour); + g.setColour (box.findColour (ComboBox::focusedOutlineColourId)); g.drawRect (0, 0, width, height, 2); } else diff --git a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V4.cpp b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V4.cpp index 411b41f711..695978c227 100644 --- a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V4.cpp +++ b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V4.cpp @@ -1343,6 +1343,7 @@ void LookAndFeel_V4::initialiseColours() ComboBox::textColourId, currentColourScheme.getUIColour (ColourScheme::UIColour::defaultText).getARGB(), ComboBox::backgroundColourId, currentColourScheme.getUIColour (ColourScheme::UIColour::widgetBackground).getARGB(), ComboBox::arrowColourId, currentColourScheme.getUIColour (ColourScheme::UIColour::defaultText).getARGB(), + ComboBox::focusedOutlineColourId, currentColourScheme.getUIColour (ColourScheme::UIColour::outline).getARGB(), PropertyComponent::backgroundColourId, currentColourScheme.getUIColour (ColourScheme::UIColour::widgetBackground).getARGB(), PropertyComponent::labelTextColourId, currentColourScheme.getUIColour (ColourScheme::UIColour::defaultText).getARGB(), diff --git a/modules/juce_gui_basics/widgets/juce_ComboBox.h b/modules/juce_gui_basics/widgets/juce_ComboBox.h index 302f6df981..042fc9e0c5 100644 --- a/modules/juce_gui_basics/widgets/juce_ComboBox.h +++ b/modules/juce_gui_basics/widgets/juce_ComboBox.h @@ -347,11 +347,12 @@ public: */ enum ColourIds { - backgroundColourId = 0x1000b00, /**< The background colour to fill the box with. */ - textColourId = 0x1000a00, /**< The colour for the text in the box. */ - outlineColourId = 0x1000c00, /**< The colour for an outline around the box. */ - buttonColourId = 0x1000d00, /**< The base colour for the button (a LookAndFeel class will probably use variations on this). */ - arrowColourId = 0x1000e00, /**< The colour for the arrow shape that pops up the menu */ + backgroundColourId = 0x1000b00, /**< The background colour to fill the box with. */ + textColourId = 0x1000a00, /**< The colour for the text in the box. */ + outlineColourId = 0x1000c00, /**< The colour for an outline around the box. */ + buttonColourId = 0x1000d00, /**< The base colour for the button (a LookAndFeel class will probably use variations on this). */ + arrowColourId = 0x1000e00, /**< The colour for the arrow shape that pops up the menu */ + focusedOutlineColourId = 0x1000f00 /**< The colour that will be used to draw a box around the edge of the component when it has focus. */ }; //==============================================================================