"); // start table row
+
+ // Make the cue appear like a colored hotcue button.
+ QColor cueColor = mixxx::RgbColor::toQColor(pHotcue->getColor());
+ // Pick a contrasting color for the label, like in skins
+ // FIXME Use the skin's custoom dark/bright threshold?
+ const QColor textColor = Color::chooseColorByBrightness(
+ cueColor,
+ Qt::white,
+ Qt::black,
+ 127);
+ tooltip += QStringLiteral(
+ "| "
+ ""
+ // Qt RichText/Html only supports a subset of Html, so we
+ // need to fake left/right padding with whitespaces.
+ " %3 "
+ " | ")
+ .arg(cueColor.name(),
+ textColor.name(),
+ QString::number(pHotcue->getHotCue() + 1));
+ // Cue position
+ tooltip += QStringLiteral("%1 | ")
+ .arg(posOrLengthToSeconds(pHotcue->getPosition().value(), sampleRate));
+
+ // Add label if present
+ const QString label = pHotcue->getLabel();
+ if (!label.isEmpty()) {
+ tooltip += QStringLiteral("%1 | ").arg(label.toHtmlEscaped());
+ }
+
+ // Add type icon
+ // Icons are copied from LateNight Palemoon to images/library
+ // white icons were created from the original black icons
+ // still need to detect the background
+ QString iconHtml;
+ switch (pHotcue->getType()) {
+ case mixxx::CueType::Loop:
+ // white
+ iconHtml =
+ "
";
+ // black
+ // iconHtml = "
";
+ break;
+ case mixxx::CueType::Jump:
+ // white
+ iconHtml =
+ "
";
+ // black
+ // iconHtml = "
";
+ break;
+ default:
+ iconHtml = "";
+ break;
+ }
+
+ if (!iconHtml.isEmpty()) {
+ tooltip += QStringLiteral("%1 | ").arg(iconHtml);
+ } else {
+ // Add empty cell for alignment when no icon
+ tooltip += QStringLiteral(" | ");
+ }
+
+ // Add duration for saved loops/jumps
+ const auto length = pHotcue->getLengthFrames();
+ if (length > 0) {
+ tooltip += QStringLiteral("(%1) | ")
+ .arg(posOrLengthToSeconds(length, sampleRate));
+ }
+ tooltip += QStringLiteral("
"); // end table row
+ }
+
+ // Close table and HTML
+ tooltip += QStringLiteral("