1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-02-03 03:30:06 +00:00

Added ComboBox::ColourIds::focusedOutlineColourId

This commit is contained in:
ed 2017-11-20 16:34:47 +00:00
parent 7f6f978d0c
commit a40f6b3e5e
4 changed files with 11 additions and 9 deletions

View file

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

View file

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

View file

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

View file

@ -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. */
};
//==============================================================================