From 0bd046adcab219816d6085f2e043d3a8aeece3cd Mon Sep 17 00:00:00 2001 From: evgeny Date: Sun, 1 Nov 2026 22:29:29 +0100 Subject: [PATCH] Reserve telemetry width for playback catch-up speed --- tools/chatgui/src/streamplayer_window.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/chatgui/src/streamplayer_window.cpp b/tools/chatgui/src/streamplayer_window.cpp index cc74b59c6..1307dba84 100644 --- a/tools/chatgui/src/streamplayer_window.cpp +++ b/tools/chatgui/src/streamplayer_window.cpp @@ -358,11 +358,15 @@ void StreamPlayerWindow::tick() { names += QStringLiteral("%2").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("  %1x").arg(rate); names += QStringLiteral(""); + rate = QStringLiteral("  %1x").arg(rate); } + const int rateWidth = m_telemetry->fontMetrics().horizontalAdvance(QStringLiteral(" 1.88x")) + 4; + times += QStringLiteral("%2").arg(rateWidth).arg(rate); + names += QStringLiteral("").arg(rateWidth); m_telemetry->setText(QStringLiteral("%1%2
").arg(times, names)); m_telemetry->adjustSize(); m_telemetry->setToolTip(tooltip);