diff --git a/modules/juce_audio_utils/gui/juce_MidiKeyboardComponent.cpp b/modules/juce_audio_utils/gui/juce_MidiKeyboardComponent.cpp index 88004e6897..fc9b90e9ef 100644 --- a/modules/juce_audio_utils/gui/juce_MidiKeyboardComponent.cpp +++ b/modules/juce_audio_utils/gui/juce_MidiKeyboardComponent.cpp @@ -388,13 +388,13 @@ void MidiKeyboardComponent::paint (Graphics& g) else y2 = 5.0f; - g.setGradientFill (ColourGradient (Colours::black.withAlpha (0.3f), x1, y1, - Colours::transparentBlack, x2, y2, false)); - int x, w; getKeyPos (rangeEnd, x, w); x += w; + const Colour shadowCol (findColour (shadowColourId)); + g.setGradientFill (ColourGradient (shadowCol, x1, y1, shadowCol.withAlpha (0.0f), x2, y2, false)); + switch (orientation) { case horizontalKeyboard: g.fillRect (0, 0, x, 5); break; diff --git a/modules/juce_audio_utils/gui/juce_MidiKeyboardComponent.h b/modules/juce_audio_utils/gui/juce_MidiKeyboardComponent.h index 21bca127d9..c53890cfbb 100644 --- a/modules/juce_audio_utils/gui/juce_MidiKeyboardComponent.h +++ b/modules/juce_audio_utils/gui/juce_MidiKeyboardComponent.h @@ -192,7 +192,8 @@ public: keyDownOverlayColourId = 0x1005004, /**< This colour will be overlaid on the normal note colour. */ textLabelColourId = 0x1005005, upDownButtonBackgroundColourId = 0x1005006, - upDownButtonArrowColourId = 0x1005007 + upDownButtonArrowColourId = 0x1005007, + shadowColourId = 0x1005008 }; /** Returns the position within the component of the left-hand edge of a key. diff --git a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp index bf6ebe8ad4..408f752a7f 100644 --- a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp +++ b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp @@ -175,6 +175,7 @@ LookAndFeel_V2::LookAndFeel_V2() 0x1005005, /*MidiKeyboardComponent::textLabelColourId*/ 0xff000000, 0x1005006, /*MidiKeyboardComponent::upDownButtonBackgroundColourId*/ 0xffd3d3d3, 0x1005007, /*MidiKeyboardComponent::upDownButtonArrowColourId*/ 0xff000000, + 0x1005008, /*MidiKeyboardComponent::shadowColourId*/ 0x4c000000, 0x1004500, /*CodeEditorComponent::backgroundColourId*/ 0xffffffff, 0x1004502, /*CodeEditorComponent::highlightColourId*/ textHighlightColour,