Name captures after their source track: label and filename both, on every interactive mint site, and show the name on the panel card

This commit is contained in:
2026-08-01 21:46:53 -04:00
parent 09d64c9f46
commit 3278b4eced
23 changed files with 626 additions and 25 deletions
+10
View File
@@ -7,6 +7,16 @@
namespace reasampler::ui {
Rect cardNameStrip(const Rect& cell) {
// Both strips plus a waveform band at least as tall as one strip; below that the card
// 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.
return Rect{cell.x + kCardStripPad, cell.y + 1,
cell.width - 2 * kCardStripPad, kCardStripHeight};
}
std::string formatBarsBeats(const MusicalLength& m) {
if (m.tempoBpm <= 0.0 || m.timeSigNum <= 0 || m.timeSigDenom <= 0) return {};