Windows: Fix the progress text being cut but a few pixels
authorJocelyn Turcotte <jturcotte@woboq.com>
Thu, 14 Jan 2016 12:01:18 +0000 (13:01 +0100)
committerJocelyn Turcotte <jturcotte@woboq.com>
Thu, 14 Jan 2016 12:01:18 +0000 (13:01 +0100)
QFontMetrics::boundingRect doesn't return the right size for this
font size for some reason, while it works well if we remove the
smaller point size adjustment for the progress font.

To avoid having to debug the font system in Qt just increase the
existing +2px adjustment to +5px so that it renders fine.

src/gui/folderstatusdelegate.cpp

index 8c5816aff0b1ba059845231d1178bc855eb51a94..af19fa31283176d997dd37bc6d0ae4e2d3b65ffa 100644 (file)
@@ -295,7 +295,7 @@ void FolderStatusDelegate::paint(QPainter *painter, const QStyleOptionViewItem &
 
         // Sizes-Text
         QRect octetRect = progressFm.boundingRect(QRect(), 0, overallString );
-        int progressTextWidth = octetRect.width() + 2;
+        int progressTextWidth = octetRect.width() + 5;
 
         // Overall Progress Bar.
         QRect pBRect;