mirror of
https://github.com/fralx/LimeReport.git
synced 2024-12-24 08:34:38 +03:00
ShapeItem has been fixed
This commit is contained in:
parent
71256ccef6
commit
d79ca93d32
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user