mirror of
https://codeberg.org/armin/monostep.git
synced 2026-09-01 12:20:46 +02:00
apply jellybeans color scheme
This commit is contained in:
parent
8925199aa3
commit
a45006c201
3 changed files with 48 additions and 23 deletions
|
|
@ -86,8 +86,19 @@ void SequencerMatrix::paint (juce::Graphics& g)
|
|||
g.setColour (colours::bg);
|
||||
g.fillRect (bounds.toFloat());
|
||||
|
||||
// slightly darker rows for the black keys on a piano keyboard
|
||||
g.setColour (colours::bg.darker (0.45f));
|
||||
for (int r = 0; r < numRows; ++r)
|
||||
{
|
||||
const int pc = ((semitoneForRow (r) % 12) + 12) % 12;
|
||||
const bool isBlackKey = pc == 1 || pc == 3 || pc == 6 || pc == 8 || pc == 10;
|
||||
|
||||
if (isBlackKey)
|
||||
g.fillRect (ox, oy + r * cellH, (float) bounds.getWidth(), cellH);
|
||||
}
|
||||
|
||||
// selected column highlight
|
||||
g.setColour (colours::selected.withAlpha (0.02f));
|
||||
g.setColour (colours::highlight.withAlpha (0.06f));
|
||||
g.fillRect (ox + selectedStep * cellW, oy, cellW, (float) bounds.getHeight());
|
||||
|
||||
// play position column highlight (drawn before cells so notes stay vivid)
|
||||
|
|
@ -175,8 +186,8 @@ void SequencerMatrix::paint (juce::Graphics& g)
|
|||
// cell body: keep a visible top->bottom gradient in both states. The selected
|
||||
// note is brighter overall, but still holds its gradient (a flat bright fill
|
||||
// would read as "no gradient").
|
||||
const juce::Colour noteTop = isSelected ? colours::accent.brighter (0.2f) : colours::accent;
|
||||
const juce::Colour noteBottom = colours::accent.darker (0.3f);
|
||||
const juce::Colour noteTop = isSelected ? colours::note.brighter (0.2f) : colours::note;
|
||||
const juce::Colour noteBottom = colours::note.darker (0.3f);
|
||||
|
||||
juce::ColourGradient grad (noteTop,
|
||||
cell.getTopLeft().translated (cell.getWidth() * 0.5f, 0.0f),
|
||||
|
|
@ -199,7 +210,7 @@ void SequencerMatrix::paint (juce::Graphics& g)
|
|||
// --- slide row (bottom row) ----------------------------------------------
|
||||
const float slideY = oy + numRows * cellH;
|
||||
|
||||
g.setColour (colours::accentDim);
|
||||
g.setColour (colours::slide.darker (0.45f));
|
||||
g.drawHorizontalLine (juce::roundToInt (slideY - 1.0f), ox, ox + (float) bounds.getWidth());
|
||||
|
||||
g.setFont (font (9.0f));
|
||||
|
|
@ -218,9 +229,9 @@ void SequencerMatrix::paint (juce::Graphics& g)
|
|||
cellW - 3.0f, cellH - 3.0f);
|
||||
|
||||
// match the gradient style of the note cells
|
||||
juce::ColourGradient grad (colours::accent,
|
||||
juce::ColourGradient grad (colours::slide,
|
||||
cell.getTopLeft().translated (cell.getWidth() * 0.5f, 0.0f),
|
||||
colours::accent.darker (0.3f),
|
||||
colours::slide.darker (0.3f),
|
||||
cell.getBottomLeft().translated (cell.getWidth() * 0.5f, 0.0f),
|
||||
false);
|
||||
g.setGradientFill (grad);
|
||||
|
|
@ -238,7 +249,7 @@ void SequencerMatrix::paint (juce::Graphics& g)
|
|||
// --- accent row (bottom row) ----------------------------------------------
|
||||
const float accentY = oy + (numRows + 1) * cellH;
|
||||
|
||||
g.setColour (colours::accentDim);
|
||||
g.setColour (colours::accent.darker (0.45f));
|
||||
g.drawHorizontalLine (juce::roundToInt (accentY - 1.0f), ox, ox + (float) bounds.getWidth());
|
||||
|
||||
g.setFont (font (9.0f));
|
||||
|
|
@ -258,9 +269,9 @@ void SequencerMatrix::paint (juce::Graphics& g)
|
|||
|
||||
const bool isSelected = (i == selectedStep);
|
||||
|
||||
juce::ColourGradient agrad (isSelected ? colours::accent2.brighter (0.2f) : colours::accent2,
|
||||
juce::ColourGradient agrad (isSelected ? colours::highlight.brighter (0.2f) : colours::highlight,
|
||||
cell.getTopLeft().translated (cell.getWidth() * 0.5f, 0.0f),
|
||||
colours::accent2.darker (0.3f),
|
||||
colours::highlight.darker (0.3f),
|
||||
cell.getBottomLeft().translated (cell.getWidth() * 0.5f, 0.0f),
|
||||
false);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue