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:
@@ -30,17 +30,27 @@ void drawCardMeta(LICE_IBitmap* bmp, const CellRect& rect, const Sample& s) {
|
||||
const std::string bars = formatBarsBeats(ml);
|
||||
const std::string secs = formatSecondsMs(s.lengthSeconds);
|
||||
|
||||
const int stripH = 12;
|
||||
const int pad = 3;
|
||||
const int y = rect.y + rect.height - stripH;
|
||||
const int y = rect.y + rect.height - kCardStripHeight;
|
||||
if (!bars.empty()) {
|
||||
const KitBox left{rect.x + pad, y, rect.width / 2 - pad, stripH};
|
||||
const KitBox left{rect.x + kCardStripPad, y,
|
||||
rect.width / 2 - kCardStripPad, kCardStripHeight};
|
||||
text(bmp, left, bars.c_str(), Font::Micro, Role::TextDim, Align::Left);
|
||||
}
|
||||
const KitBox right{rect.x + rect.width / 2, y, rect.width / 2 - pad, stripH};
|
||||
const KitBox right{rect.x + rect.width / 2, y,
|
||||
rect.width / 2 - kCardStripPad, kCardStripHeight};
|
||||
text(bmp, right, secs.c_str(), Font::ValueMono, Role::TextDim, Align::Right);
|
||||
}
|
||||
|
||||
// The capture's name across the top of the card. The kit clips with an end-ellipsis, so a
|
||||
// long name shortens ON SCREEN only — the stored label is never truncated. An entry with
|
||||
// no label (nothing writes one today, but old banks are not migrated) draws nothing.
|
||||
void drawCardName(LICE_IBitmap* bmp, const CellRect& rect, const Sample& s) {
|
||||
if (s.displayName.empty()) return;
|
||||
const CellRect strip = cardNameStrip(rect);
|
||||
if (strip.empty()) return;
|
||||
text(bmp, strip, s.displayName.c_str(), Font::Micro, Role::TextPrimary, Align::Left);
|
||||
}
|
||||
|
||||
void drawThumbnail(LICE_IBitmap* bmp, const CellRect& rect, const Envelope& env,
|
||||
bool selected, bool focused, bool hovered, const Sample* sample) {
|
||||
// Selected cards draw the normal cell surface, not an inverted fill — selection
|
||||
@@ -59,7 +69,10 @@ void drawThumbnail(LICE_IBitmap* bmp, const CellRect& rect, const Envelope& env,
|
||||
|
||||
drawWaveform(bmp, cell, env);
|
||||
|
||||
if (sample) drawCardMeta(bmp, rect, *sample);
|
||||
if (sample) {
|
||||
drawCardName(bmp, rect, *sample);
|
||||
drawCardMeta(bmp, rect, *sample);
|
||||
}
|
||||
}
|
||||
|
||||
KitBox toKitBox(const RECT& r) {
|
||||
|
||||
@@ -109,6 +109,7 @@ using ui::TooltipBox;
|
||||
using ui::TooltipSpec;
|
||||
using ui::applyClick;
|
||||
using ui::assemblePathList;
|
||||
using ui::cardNameStrip;
|
||||
using ui::clampTabScroll;
|
||||
using ui::columnsForWidth;
|
||||
using ui::computeBarSlots;
|
||||
@@ -132,6 +133,8 @@ using ui::hitTestMenuButton;
|
||||
using ui::hitTestPruneButton;
|
||||
using ui::hitTestSlot;
|
||||
using ui::hitTestTabStrip;
|
||||
using ui::kCardStripHeight;
|
||||
using ui::kCardStripPad;
|
||||
using ui::menuButtonReserve;
|
||||
using ui::modeSegmentEnabled;
|
||||
using ui::navigate;
|
||||
|
||||
Reference in New Issue
Block a user