Reserve telemetry width for playback catch-up speed
This commit is contained in:
1 parent
b414fc9538
commit
0bd046adca
1 file changed
+6
-2
@@ -358,11 +358,15 @@ void StreamPlayerWindow::tick() {
|
||||
names += QStringLiteral("<td align='center' style='color:%1'>%2</td>").arg(color, shortNodeName(t.names[i]));
|
||||
tooltip += QString::fromUtf8(t.names[i]) + QStringLiteral(": ") + bufferTime(us);
|
||||
}
|
||||
QString rate = QStringLiteral(" ");
|
||||
if (tempo > 1000) {
|
||||
QString rate = QString::number(tempo / 1000.0, 'f', 2);
|
||||
rate = QString::number(tempo / 1000.0, 'f', 2);
|
||||
if (rate.endsWith(QLatin1Char('0'))) rate.chop(1);
|
||||
times += QStringLiteral("<td> %1x</td>").arg(rate); names += QStringLiteral("<td></td>");
|
||||
rate = QStringLiteral(" %1x").arg(rate);
|
||||
}
|
||||
const int rateWidth = m_telemetry->fontMetrics().horizontalAdvance(QStringLiteral(" 1.88x")) + 4;
|
||||
times += QStringLiteral("<td width='%1'>%2</td>").arg(rateWidth).arg(rate);
|
||||
names += QStringLiteral("<td width='%1'></td>").arg(rateWidth);
|
||||
m_telemetry->setText(QStringLiteral("<table cellspacing='0'><tr>%1</tr><tr>%2</tr></table>").arg(times, names));
|
||||
m_telemetry->adjustSize();
|
||||
m_telemetry->setToolTip(tooltip);
|
||||
|
||||
Reference in new issue
Block a user