From 6553921dd537e416da2f4d1441ab6d63059cda60 Mon Sep 17 00:00:00 2001 From: Rolf Eike Beer Date: Wed, 18 Jul 2018 11:07:52 +0200 Subject: QWindowsStyle: respect rectangle when drawing PE_IndicatorViewItemCheck The hardcoded value is based on the values set in qcommonstyle.cpp, but in case this is changed using a proxy style the actual values are not respected. They would even be wrong if nothing is changed but QStyleHelper::dpiScaled(13.) does not return 13. Change-Id: Ib451d07800b3b4e8cafd1f4fef84cd9bf02f9bba Reviewed-by: Andre de la Rocha Reviewed-by: Friedemann Kleint --- src/widgets/styles/qwindowsstyle.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/widgets') diff --git a/src/widgets/styles/qwindowsstyle.cpp b/src/widgets/styles/qwindowsstyle.cpp index 4b9d0b5adc..d4ccd0931e 100644 --- a/src/widgets/styles/qwindowsstyle.cpp +++ b/src/widgets/styles/qwindowsstyle.cpp @@ -840,7 +840,7 @@ void QWindowsStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, : opt->palette.text().color()); if (opt->state & State_NoChange) p->setBrush(opt->palette.brush(QPalette::Button)); - p->drawRect(opt->rect.x() + 1, opt->rect.y() + 1, 11, 11); + p->drawRect(opt->rect.x() + 1, opt->rect.y() + 1, opt->rect.width() - 2, opt->rect.height() - 2); } #endif // QT_CONFIG(itemviews) if (!(opt->state & State_Off)) { -- cgit v1.2.3