Fix qstylesheetstyle clip border error
The left border path clip error when border size is odd. That because borderClip calc path with border with divide 2. It should be 2.0 that make result to accurately real number. Pick-to: 5.15 Change-Id: I8c6f358afa4f3c8c9e5b263707ee145f6e5491c0 Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This commit is contained in:
parent
e48655d6f3
commit
ebf753d0ee
@ -1339,11 +1339,11 @@ QPainterPath QRenderRule::borderClip(QRect r)
|
||||
|
||||
path.lineTo(rect.x() + blr.width(), curY);
|
||||
curX = rect.left() + borders[LeftEdge]/2.0;
|
||||
path.arcTo(curX, rect.bottom() - 2*blr.height() + borders[BottomEdge]/2,
|
||||
path.arcTo(curX, rect.bottom() - 2*blr.height() + borders[BottomEdge]/2.0,
|
||||
blr.width()*2 - borders[LeftEdge], blr.height()*2 - borders[BottomEdge], 270, -90);
|
||||
|
||||
path.lineTo(curX, rect.top() + tlr.height());
|
||||
path.arcTo(curX, rect.top() + borders[TopEdge]/2,
|
||||
path.arcTo(curX, rect.top() + borders[TopEdge]/2.0,
|
||||
tlr.width()*2 - borders[LeftEdge], tlr.height()*2 - borders[TopEdge], 180, -90);
|
||||
|
||||
path.closeSubpath();
|
||||
|
Loading…
x
Reference in New Issue
Block a user