Ψ-W2-T1 remediation: scrim the card name over the waveform, hedge two SDK claims, fix a UTF-8-truncation empty-label bug, file the legibility DAW deferral

This commit is contained in:
2026-08-01 22:08:35 -04:00
parent 3278b4eced
commit 0feb32d59b
12 changed files with 115 additions and 11 deletions
+3 -1
View File
@@ -12,7 +12,9 @@ Rect cardNameStrip(const Rect& cell) {
// is a text block, not a thumbnail.
const int minHeight = 3 * kCardStripHeight;
if (cell.width <= 2 * kCardStripPad || cell.height < minHeight) return Rect{};
// Inset by 1px from the top edge so the name never sits on the selection border.
// Inset by 1px from the top edge so the name never sits on the focused-cell inner ring
// (drawn at rect.y+1, panel_render.cpp) — the selection border itself is at rect.y and is
// clear regardless.
return Rect{cell.x + kCardStripPad, cell.y + 1,
cell.width - 2 * kCardStripPad, kCardStripHeight};
}
+7 -3
View File
@@ -15,9 +15,13 @@ inline constexpr int kCardStripHeight = 12;
inline constexpr int kCardStripPad = 3;
// The strip the card's name line occupies: across the top of the cell, drawn OVER the
// waveform exactly as the length read-out is drawn over it at the bottom. Empty when the
// cell has no room for both strips plus a waveform worth looking at — the caller draws
// nothing rather than burying the card under text.
// waveform exactly as the length read-out is drawn over it at the bottom, rather than a
// reserved non-drawing band — kCardStripHeight (12px) is a small slice of the shipping 84px
// cell, and the overlay matches the bottom read-out's existing convention rather than
// introducing a second layout rule. The draw site scrims behind the text so it stays legible
// over the waveform's accent fill (`kCardNameScrimAlpha`, `theme.h`). Empty when the cell has
// no room for both strips plus a waveform worth looking at — the caller draws nothing rather
// than burying the card under text.
Rect cardNameStrip(const Rect& cell);
// Musical length inputs, taken straight off a Sample's capture-time stamp. tempoBpm 0 = unknown;
+7
View File
@@ -97,6 +97,13 @@ KitColor compositeOver(const KitColor& over, const KitColor& under, double alpha
// test composes the same value the shell draws with (see compositeOver).
inline constexpr double kLoopSpanFillAlpha = 0.20;
// The card name strip's scrim: bg/base composited at this alpha UNDER the name text, so
// text/primary stays readable when a loud capture's waveform peak (accent/primary) reaches
// into the strip. Named HERE, same reason as kLoopSpanFillAlpha above — test_theme.cpp composes
// this exact value against the strip's worst-case background (accent/primary) to pin the 4.5:1
// body floor Font::Micro answers to.
inline constexpr double kCardNameScrimAlpha = 0.75;
// Relative luminance per WCAG 2.1 (sRGB linearization + 0.2126/0.7152/0.0722 weighting). Alpha
// is ignored — a translucent overlay's effective color is the caller's to compose first
// (compositeOver).