instrument: reassign loop-marker role off tertiary, onto secondary
Loop span/markers and the envelope overlay trace shared tertiary purple in the same overlay rect. Loop markers now draw secondary; envelope overlay keeps tertiary. Adds a theme-level distinctness regression guard.
This commit is contained in:
@@ -24,10 +24,14 @@ using namespace reasampler::instrument::ui; // lanes + waveform geometry
|
|||||||
using audio::computeEnvelope;
|
using audio::computeEnvelope;
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
// Marker roles — semantic, drawn through the kit's palette: start = teal (secondary), loop
|
// Marker roles — semantic, drawn through the kit's palette: start AND loop start/end both
|
||||||
// start/end = purple (tertiary). The loop-span fill is a faint purple.
|
// = teal (secondary). Loop markers moved off tertiary/purple so the loop span + bars no
|
||||||
|
// longer share a role with the envelope overlay trace, which owns tertiary exclusively in
|
||||||
|
// this region (measured RGB was identical: #C2AAE8 for both). Secondary-vs-primary contrast
|
||||||
|
// here measures 1.12:1, below tertiary's 1.37:1 — accepted deliberately: markers are bars
|
||||||
|
// and a span fill, not the 1px trace that pairing was moved off of.
|
||||||
constexpr Role kRoleStartMarker = Role::AccentSecondary;
|
constexpr Role kRoleStartMarker = Role::AccentSecondary;
|
||||||
constexpr Role kRoleLoopMarker = Role::AccentTertiary;
|
constexpr Role kRoleLoopMarker = Role::AccentSecondary;
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
void ReaSamplerEditor::paintWaveform(LICE_IBitmap* bmp, const Rect& band) {
|
void ReaSamplerEditor::paintWaveform(LICE_IBitmap* bmp, const Rect& band) {
|
||||||
|
|||||||
@@ -147,6 +147,16 @@ static void testOverlayAccentSeparatesFromTheWaveformAccent() {
|
|||||||
CHECK(delta >= 60);
|
CHECK(delta >= 60);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// editor_paint_waveform.cpp draws the loop span/markers and the envelope overlay trace into
|
||||||
|
// the SAME overlay rect. Loop markers are secondary (this track's reassignment, off tertiary,
|
||||||
|
// which the envelope overlay now owns exclusively there); a future palette edit that collapses
|
||||||
|
// the two back to one role must fail here rather than silently recreating the finding.
|
||||||
|
static void testLoopMarkerAndEnvelopeOverlayRolesAreDistinct() {
|
||||||
|
const KitColor loopMarker = roleColor(Role::AccentSecondary);
|
||||||
|
const KitColor envelopeOverlay = roleColor(Role::AccentTertiary);
|
||||||
|
CHECK(!(loopMarker == envelopeOverlay));
|
||||||
|
}
|
||||||
|
|
||||||
static void testWarnClearsStateFloorOnBackground() {
|
static void testWarnClearsStateFloorOnBackground() {
|
||||||
// warn (destructive) must be unmistakable -> clears the state floor on the base.
|
// warn (destructive) must be unmistakable -> clears the state floor on the base.
|
||||||
CHECK(contrastRatio(roleColor(Role::Warn), roleColor(Role::BgBase))
|
CHECK(contrastRatio(roleColor(Role::Warn), roleColor(Role::BgBase))
|
||||||
@@ -264,6 +274,7 @@ int main() {
|
|||||||
testTextOnHoverSurfaceClearsFloor();
|
testTextOnHoverSurfaceClearsFloor();
|
||||||
testSecondaryTertiaryAreDistinguishable();
|
testSecondaryTertiaryAreDistinguishable();
|
||||||
testOverlayAccentSeparatesFromTheWaveformAccent();
|
testOverlayAccentSeparatesFromTheWaveformAccent();
|
||||||
|
testLoopMarkerAndEnvelopeOverlayRolesAreDistinct();
|
||||||
testWarnClearsStateFloorOnBackground();
|
testWarnClearsStateFloorOnBackground();
|
||||||
testLabelOnActiveSurfaceClearsFloor();
|
testLabelOnActiveSurfaceClearsFloor();
|
||||||
testRolesAreDistinctAndElevationMonotonic();
|
testRolesAreDistinctAndElevationMonotonic();
|
||||||
|
|||||||
Reference in New Issue
Block a user