src/ui/canvas.cpp

changeset 113
c0d064521ee0
parent 112
5760cbb32bc0
child 115
ed884a2fb009
--- a/src/ui/canvas.cpp	Sun Jul 25 20:39:21 2021 +0300
+++ b/src/ui/canvas.cpp	Mon Jul 26 11:50:45 2021 +0300
@@ -194,10 +194,7 @@
 				}
 				painter.drawText(position, text);
 			};
-			const QRectF box {
-				QPointF{0, 0},
-				QPointF{static_cast<qreal>(this->width()), static_cast<qreal>(this->height())}
-			};
+			const QRectF box {QPointF{0, 0}, sizeToSizeF(this->size())};
 			const QPointF p1 = this->modelToScreenCoordinates(glm::vec3{0, 0, 0});
 
 			static const struct

mercurial