From d79ca93d32a6a96c854d0bda1ebec996648e786d Mon Sep 17 00:00:00 2001 From: Arin Alexander Date: Thu, 27 Jun 2019 23:37:06 +0300 Subject: [PATCH] ShapeItem has been fixed --- limereport/items/lrshapeitem.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/limereport/items/lrshapeitem.cpp b/limereport/items/lrshapeitem.cpp index ab07113..182ea9e 100644 --- a/limereport/items/lrshapeitem.cpp +++ b/limereport/items/lrshapeitem.cpp @@ -90,6 +90,10 @@ void ShapeItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, painter->setBrush(brush); painter->setBackground(QBrush(Qt::NoBrush)); painter->setOpacity(qreal(m_opacity)/100); + QRectF rectangleRect = rect().adjusted((lineWidth() / 2), + (lineWidth() / 2), + -(lineWidth() / 2), + -(lineWidth() / 2)); switch (m_shape){ case HorizontalLine: @@ -105,9 +109,9 @@ void ShapeItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, case Rectangle: if (m_cornerRadius != 0){ painter->setRenderHint(QPainter::Antialiasing); - painter->drawRoundedRect(rect(),m_cornerRadius,m_cornerRadius); + painter->drawRoundedRect(rectangleRect,m_cornerRadius,m_cornerRadius); } else { - painter->drawRect(rect()); + painter->drawRect(rectangleRect); } break; }