diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2018-09-06 01:00:33 +0200 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2018-09-06 01:00:33 +0200 |
commit | e5d028941339bbc5f5eaa2dfa5a2bb8d17353f24 (patch) | |
tree | 3d91bf1dbe6728d8c6f85dd46b5aff67e83d9ae6 /src/widgets/styles | |
parent | 40cd0f35ef0b27b1451caf393a97b8a4ac8cd4b2 (diff) | |
parent | 028727c20ca43f1a56bad010354837e238e30024 (diff) |
Merge remote-tracking branch 'origin/5.12' into dev
Change-Id: I2f6e1c0f649c5098723b776c774a8a689bb60582
Diffstat (limited to 'src/widgets/styles')
-rw-r--r-- | src/widgets/styles/qwindowsstyle.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/widgets/styles/qwindowsstyle.cpp b/src/widgets/styles/qwindowsstyle.cpp index d4ccd0931e..611de6991f 100644 --- a/src/widgets/styles/qwindowsstyle.cpp +++ b/src/widgets/styles/qwindowsstyle.cpp @@ -845,12 +845,14 @@ void QWindowsStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, #endif // QT_CONFIG(itemviews) if (!(opt->state & State_Off)) { QPointF points[6]; - points[0] = { opt->rect.x() + QStyleHelper::dpiScaled(3.5), opt->rect.y() + QStyleHelper::dpiScaled(5.5) }; - points[1] = { points[0].x(), points[0].y() + QStyleHelper::dpiScaled(2) }; - points[2] = { points[1].x() + QStyleHelper::dpiScaled(2), points[1].y() + QStyleHelper::dpiScaled(2) }; - points[3] = { points[2].x() + QStyleHelper::dpiScaled(4), points[2].y() - QStyleHelper::dpiScaled(4) }; - points[4] = { points[3].x(), points[3].y() - QStyleHelper::dpiScaled(2) }; - points[5] = { points[4].x() - QStyleHelper::dpiScaled(4), points[4].y() + QStyleHelper::dpiScaled(4) }; + qreal scaleh = opt->rect.width() / 12.0; + qreal scalev = opt->rect.height() / 12.0; + points[0] = { opt->rect.x() + 3.5 * scaleh, opt->rect.y() + 5.5 * scalev }; + points[1] = { points[0].x(), points[0].y() + 2 * scalev }; + points[2] = { points[1].x() + 2 * scaleh, points[1].y() + 2 * scalev }; + points[3] = { points[2].x() + 4 * scaleh, points[2].y() - 4 * scalev }; + points[4] = { points[3].x(), points[3].y() - 2 * scalev }; + points[5] = { points[4].x() - 4 * scaleh, points[4].y() + 4 * scalev }; p->setPen(QPen(opt->palette.text().color(), 0)); p->setBrush(opt->palette.text().color()); p->drawPolygon(points, 6); |