diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp index 14761903cf..336fa2a1ce 100644 --- a/src/qt/guiutil.cpp +++ b/src/qt/guiutil.cpp @@ -1785,14 +1785,14 @@ QString formatNiceTimeOffset(qint64 secs) QString formatBytes(uint64_t bytes) { - if(bytes < 1024) + if (bytes < 1'000) return QObject::tr("%1 B").arg(bytes); - if(bytes < 1024 * 1024) - return QObject::tr("%1 KB").arg(bytes / 1024); - if(bytes < 1024 * 1024 * 1024) - return QObject::tr("%1 MB").arg(bytes / 1024 / 1024); + if (bytes < 1'000'000) + return QObject::tr("%1 kB").arg(bytes / 1'000); + if (bytes < 1'000'000'000) + return QObject::tr("%1 MB").arg(bytes / 1'000'000); - return QObject::tr("%1 GB").arg(bytes / 1024 / 1024 / 1024); + return QObject::tr("%1 GB").arg(bytes / 1'000'000'000); } qreal calculateIdealFontSize(int width, const QString& text, QFont font, qreal minPointSize, qreal font_size) { diff --git a/src/qt/trafficgraphwidget.cpp b/src/qt/trafficgraphwidget.cpp index 5f19928456..f33d784535 100644 --- a/src/qt/trafficgraphwidget.cpp +++ b/src/qt/trafficgraphwidget.cpp @@ -98,7 +98,7 @@ void TrafficGraphWidget::paintEvent(QPaintEvent *) float val = pow(10.0f, base); float val2 = val; - const QString units = tr("KB/s"); + const QString units = tr("kB/s"); const float yMarginText = 2.0; // draw lines