diff --git a/retroshare-gui/src/gui/FileTransfer/xprogressbar.cpp b/retroshare-gui/src/gui/FileTransfer/xprogressbar.cpp index 5a3f2a8ef..9ab743f87 100644 --- a/retroshare-gui/src/gui/FileTransfer/xprogressbar.cpp +++ b/retroshare-gui/src/gui/FileTransfer/xprogressbar.cpp @@ -320,9 +320,14 @@ void xProgressBar::paint() // paint text? if (displayText) { - QLocale locale; + QRect bounding = painter->boundingRect(rect, Qt::AlignCenter, QLocale().toString(_pinfo.progress, 'f', 2) + "%"); + QColor color (255-textColor.red(), 255-textColor.green(), 255-textColor.blue(), 125); + painter->setPen(color); + painter->setBrush(QBrush(color)); + painter->drawRect(bounding.adjusted(2,2,-4,-4)); + painter->setPen(textColor); - painter->drawText(rect, Qt::AlignCenter, locale.toString(_pinfo.progress, 'f', 2) + "%"); + painter->drawText(rect, Qt::AlignCenter, QLocale().toString(_pinfo.progress, 'f', 2) + "%"); } backgroundColor.setRgb(255, 255, 255);