src/ui/canvas.cpp

changeset 100
43ce3672648a
parent 96
165777a20dc7
child 103
94719518e310
equal deleted inserted replaced
99:05ce5a34c497 100:43ce3672648a
201 break; 201 break;
202 case geom::RectangleSide::Bottom: 202 case geom::RectangleSide::Bottom:
203 position += QPointF{0, static_cast<qreal>(-fontMetrics.descent())}; 203 position += QPointF{0, static_cast<qreal>(-fontMetrics.descent())};
204 break; 204 break;
205 case geom::RectangleSide::Right: 205 case geom::RectangleSide::Right:
206 position += QPointF{static_cast<qreal>(-fontMetrics.width(text)), 0}; 206 position += QPointF{static_cast<qreal>(-fontMetrics.horizontalAdvance(text)), 0};
207 break; 207 break;
208 } 208 }
209 painter.drawText(position, text); 209 painter.drawText(position, text);
210 }; 210 };
211 const QRectF box { 211 const QRectF box {

mercurial