From 2c74e56e9d75adab5b4a8853043af596abdf2710 Mon Sep 17 00:00:00 2001 From: haruyukilxz Date: Mon, 29 Jan 2018 13:05:20 +0800 Subject: [PATCH] fix(dstyle): button border corner offset Change-Id: I5b5f7dec4ea3a805500c082d0097cdb685096ac6 --- dstyleplugin/pushbuttonhelper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dstyleplugin/pushbuttonhelper.cpp b/dstyleplugin/pushbuttonhelper.cpp index 0f9648ad..6ebdceb8 100644 --- a/dstyleplugin/pushbuttonhelper.cpp +++ b/dstyleplugin/pushbuttonhelper.cpp @@ -219,7 +219,7 @@ bool Style::drawPushButtonFrame( QPainter* painter, const QRect& rect, const QBr const qreal radius( GeometryUtils::frameRadius() ); QPainterPath path; - path.addRoundedRect(rect, radius, radius); + path.addRoundedRect(QRectF(rect).adjusted(0.5, 0.5, -0.5, -0.5), radius, radius); // ButtonTuples are QPushButton groups that needs to be taken care of, // the right corners of the LeftButton are not rounded, and the left