src/ui/canvas.cpp

changeset 100
43ce3672648a
parent 96
165777a20dc7
child 103
94719518e310
--- a/src/ui/canvas.cpp	Tue Jan 26 12:21:35 2021 +0200
+++ b/src/ui/canvas.cpp	Tue Jan 26 18:02:17 2021 +0200
@@ -203,7 +203,7 @@
 					position += QPointF{0, static_cast<qreal>(-fontMetrics.descent())};
 					break;
 				case geom::RectangleSide::Right:
-					position += QPointF{static_cast<qreal>(-fontMetrics.width(text)), 0};
+					position += QPointF{static_cast<qreal>(-fontMetrics.horizontalAdvance(text)), 0};
 					break;
 				}
 				painter.drawText(position, text);

mercurial