diff options
author | Lu YaNing <luyaning@uniontech.com> | 2020-11-04 10:17:33 +0800 |
---|---|---|
committer | Lu YaNing <luyaning@uniontech.com> | 2020-11-08 10:12:17 +0800 |
commit | ebf753d0ee017edc2b3a3f9b26347466fe4c0589 (patch) | |
tree | eb822e5593a09bc296c45f010f6896e74c20fb61 /src/widgets/styles | |
parent | e48655d6f35253dda33f94f8a9613f739556af2b (diff) |
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>
Diffstat (limited to 'src/widgets/styles')
-rw-r--r-- | src/widgets/styles/qstylesheetstyle.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/widgets/styles/qstylesheetstyle.cpp b/src/widgets/styles/qstylesheetstyle.cpp index 3a27d5b240..407134298b 100644 --- a/src/widgets/styles/qstylesheetstyle.cpp +++ b/src/widgets/styles/qstylesheetstyle.cpp @@ -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(); |