aboutsummaryrefslogtreecommitdiff
path: root/www/choqok/files/patch-libchoqok_ui_microblogwidget.cpp
blob: 8aeb9ae31a2cda7e24b7b2e06eb57db49984e92d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
--- libchoqok/ui/microblogwidget.cpp.orig	2020-02-05 11:49:13 UTC
+++ libchoqok/ui/microblogwidget.cpp
@@ -65,7 +65,7 @@ QIcon addNumToIcon(const QIcon &big , int number , con
         painter.setFont(font);
 
         QString numberStr = QString::number(number);
-        int textWidth = painter.fontMetrics().width(numberStr) + 6;
+        int textWidth = painter.fontMetrics().horizontalAdvance(numberStr) + 6;
 
         if (textWidth < result_size.width() / 2) {
             textWidth = result_size.width() / 2;