Loop-crossfade-ux review fixes: parked-drag no longer fakes LOOP OFF, waveform label contrast fixed, hover memoizes its bank read
Also corrects the cap-area, em-dash, glyph-overhang and heuristic-comment findings noted in review.
This commit is contained in:
@@ -269,6 +269,25 @@ static void testCardNameScrimClearsBodyFloorOnItsWorstBackground() {
|
||||
< textFloor(TextClass::Body));
|
||||
}
|
||||
|
||||
// The waveform band's state caption and its four mark labels (editor_paint_waveform.cpp) draw
|
||||
// text/dim (the caption, the non-promoted labels) and text/primary (the promoted label) — both
|
||||
// Font::Micro, both body class — over a bg/base scrim at kWaveformLabelScrimAlpha, itself drawn
|
||||
// over whatever drawEnvelope left in that rect. Unlike the card name strip, the worst case here
|
||||
// is text/DIM, not text/primary, so the alpha is higher than kCardNameScrimAlpha's — pin both
|
||||
// roles against the worst background (a full-scale envelope peak, accent/primary) and pin the
|
||||
// defect the scrim exists to close.
|
||||
static void testWaveformLabelScrimClearsBodyFloorOnItsWorstBackground() {
|
||||
const KitColor scrim = roleColor(Role::BgBase);
|
||||
const KitColor onFill = compositeOver(scrim, roleColor(Role::AccentPrimary),
|
||||
kWaveformLabelScrimAlpha);
|
||||
CHECK(contrastRatio(roleColor(Role::TextDim), onFill) >= textFloor(TextClass::Body));
|
||||
CHECK(contrastRatio(roleColor(Role::TextPrimary), onFill) >= textFloor(TextClass::Body));
|
||||
// Without the scrim, text/dim on the bare accent-lime fill is UNDER floor (~1.58:1) — pins
|
||||
// the defect the scrim exists to close, so a future removal of the scrim fails this first.
|
||||
CHECK(contrastRatio(roleColor(Role::TextDim), roleColor(Role::AccentPrimary))
|
||||
< textFloor(TextClass::Body));
|
||||
}
|
||||
|
||||
// --- Single point of change (structural guarantee) ----------------------------
|
||||
//
|
||||
// roleColor is the ONLY color source; there is no other public accessor that yields a
|
||||
@@ -366,6 +385,7 @@ int main() {
|
||||
testTextOnPastelFillClearsBodyFloor();
|
||||
testTextOnHoverSurfaceClearsFloor();
|
||||
testCardNameScrimClearsBodyFloorOnItsWorstBackground();
|
||||
testWaveformLabelScrimClearsBodyFloorOnItsWorstBackground();
|
||||
testCurveTraceOnHoverSurfaceClearsFloor();
|
||||
testSecondaryTertiaryAreDistinguishable();
|
||||
testOverlayTraceClearsIndicatorFloorOnTheWaveform();
|
||||
|
||||
Reference in New Issue
Block a user