Skip to content

Commit

Permalink
More differentiated selection colors in the mapping pane (#1196)
Browse files Browse the repository at this point in the history
and better alignment and so forth
  • Loading branch information
baconpaul authored Aug 27, 2024
1 parent fa91e96 commit a02c04a
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions src-ui/app/edit-screen/components/MappingPane.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1499,14 +1499,14 @@ void MappingZones::paint(juce::Graphics &g)

auto r = rectangleForZone(z.second);

auto borderColor = editor->themeColor(theme::ColorMap::accent_1b);
auto fillColor = borderColor.withAlpha(0.2f);
auto textColor = editor->themeColor(theme::ColorMap::accent_1b);
auto borderColor = editor->themeColor(theme::ColorMap::accent_2a);
auto fillColor = editor->themeColor(theme::ColorMap::accent_2b).withAlpha(0.32f);
auto textColor = editor->themeColor(theme::ColorMap::accent_2a);

if (drawSelected)
{
borderColor = editor->themeColor(theme::ColorMap::accent_1a);
fillColor = borderColor.withAlpha(0.5f);
borderColor = editor->themeColor(theme::ColorMap::accent_1b);
fillColor = borderColor.withAlpha(0.32f);
textColor = editor->themeColor(theme::ColorMap::accent_1a);
}

Expand All @@ -1516,7 +1516,7 @@ void MappingZones::paint(juce::Graphics &g)
g.drawRect(r, 1.f);
g.setColour(textColor);
g.setFont(editor->themeApplier.interRegularFor(11));
g.drawText(std::get<2>(z.second), r.reduced(5, 3), juce::Justification::topLeft);
g.drawText(std::get<2>(z.second), r.reduced(5, 4), juce::Justification::topLeft);

auto ct = display->voiceCountFor(z.first);
drawVoiceMarkers(r, ct);
Expand Down Expand Up @@ -1706,11 +1706,14 @@ void MappingZones::paint(juce::Graphics &g)

auto r = rectangleForZone(z.second);
g.setColour(selZoneColor);
g.drawRect(r, 2.f);

g.setColour(editor->themeColor(theme::ColorMap::generic_content_high));
g.setFont(editor->themeApplier.interRegularFor(11));
g.drawText(std::get<2>(z.second), r.reduced(5, 3), juce::Justification::topLeft);
g.drawRect(r, 3.f);

g.setColour(editor->themeColor(theme::ColorMap::generic_content_lowest));
auto f = editor->themeApplier.interRegularFor(11);
auto txt = std::get<2>(z.second);
auto rr = r.reduced(5, 4);
g.setFont(f);
g.drawText(std::get<2>(z.second), rr, juce::Justification::topLeft);

auto ct = display->voiceCountFor(z.first);
drawVoiceMarkers(r, ct);
Expand Down

0 comments on commit a02c04a

Please sign in to comment.