aboutsummaryrefslogtreecommitdiffstats
path: root/deskutils/fbreader/files/patch-zlibrary_ui_src_qt4_view_ZLQtPaintContext.cpp
blob: 5b3c1e610dff354da34146691984a2e21487bc8c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
--- zlibrary/ui/src/qt4/view/ZLQtPaintContext.cpp.orig	2024-12-20 19:22:52 UTC
+++ zlibrary/ui/src/qt4/view/ZLQtPaintContext.cpp
@@ -144,12 +144,12 @@ int ZLQtPaintContext::stringWidth(const char *str, int
 }
 
 int ZLQtPaintContext::stringWidth(const char *str, int len, bool) const {
-	return myPainter->fontMetrics().width(QString::fromUtf8(str, len));
+	return myPainter->fontMetrics().horizontalAdvance(QString::fromUtf8(str, len));
 }
 
 int ZLQtPaintContext::spaceWidth() const {
 	if (mySpaceWidth == -1) {
-		mySpaceWidth = myPainter->fontMetrics().width(' ');
+		mySpaceWidth = myPainter->fontMetrics().horizontalAdvance(' ');
 	}
 	return mySpaceWidth;
 }