mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Merge remote-tracking branch 'gh/master' into develop
This commit is contained in:
commit
697e56e426
1 changed files with 5 additions and 8 deletions
|
|
@ -26,11 +26,8 @@ class MidiKeyboardUpDownButton : public Button
|
|||
{
|
||||
public:
|
||||
MidiKeyboardUpDownButton (MidiKeyboardComponent& comp, const int d)
|
||||
: Button (String::empty),
|
||||
owner (comp),
|
||||
delta (d)
|
||||
: Button (String::empty), owner (comp), delta (d)
|
||||
{
|
||||
setOpaque (true);
|
||||
}
|
||||
|
||||
void clicked() override
|
||||
|
|
@ -60,8 +57,7 @@ private:
|
|||
};
|
||||
|
||||
//==============================================================================
|
||||
MidiKeyboardComponent::MidiKeyboardComponent (MidiKeyboardState& s,
|
||||
const Orientation o)
|
||||
MidiKeyboardComponent::MidiKeyboardComponent (MidiKeyboardState& s, Orientation o)
|
||||
: state (s),
|
||||
xOffset (0),
|
||||
blackNoteLength (1),
|
||||
|
|
@ -92,7 +88,7 @@ MidiKeyboardComponent::MidiKeyboardComponent (MidiKeyboardState& s,
|
|||
mouseOverNotes.insertMultiple (0, -1, 32);
|
||||
mouseDownNotes.insertMultiple (0, -1, 32);
|
||||
|
||||
setOpaque (true);
|
||||
colourChanged();
|
||||
setWantsKeyboardFocus (true);
|
||||
|
||||
state.addListener (this);
|
||||
|
|
@ -169,6 +165,7 @@ void MidiKeyboardComponent::setScrollButtonsVisible (const bool newCanScroll)
|
|||
|
||||
void MidiKeyboardComponent::colourChanged()
|
||||
{
|
||||
setOpaque (findColour (whiteNoteColourId).isOpaque());
|
||||
repaint();
|
||||
}
|
||||
|
||||
|
|
@ -342,7 +339,7 @@ void MidiKeyboardComponent::repaintNote (const int noteNum)
|
|||
|
||||
void MidiKeyboardComponent::paint (Graphics& g)
|
||||
{
|
||||
g.fillAll (Colours::white.overlaidWith (findColour (whiteNoteColourId)));
|
||||
g.fillAll (findColour (whiteNoteColourId));
|
||||
|
||||
const Colour lineColour (findColour (keySeparatorLineColourId));
|
||||
const Colour textColour (findColour (textLabelColourId));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue