summaryrefslogtreecommitdiffstats
path: root/src/widgets/styles/qfusionstyle.cpp
diff options
context:
space:
mode:
authorAlessandro Portale <alessandro.portale@qt.io>2017-07-07 14:10:15 +0200
committerAlessandro Portale <alessandro.portale@qt.io>2017-07-07 16:23:45 +0000
commitf2db946fa4d660d4e4fbddb777a8ef7df05d2282 (patch)
tree9cd196f3f30ce27bd6ea980d0cec1acf4e49fca8 /src/widgets/styles/qfusionstyle.cpp
parentb6d5026b1f8d7ed6424f9a395d47fc4c62d4751b (diff)
QWidgets/FusionStyle: Fix menu drawing under HighDPI
Delegating the border painting to qDrawPlainRect ensures that there are no off-by-one pixel issues. Task-number: QTBUG-61845 Change-Id: I732795e048cbc2e5b279782e9a19700884f8bc40 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'src/widgets/styles/qfusionstyle.cpp')
-rw-r--r--src/widgets/styles/qfusionstyle.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/widgets/styles/qfusionstyle.cpp b/src/widgets/styles/qfusionstyle.cpp
index 983413d149..dd8b1b1d69 100644
--- a/src/widgets/styles/qfusionstyle.cpp
+++ b/src/widgets/styles/qfusionstyle.cpp
@@ -990,11 +990,9 @@ void QFusionStyle::drawPrimitive(PrimitiveElement elem,
break;
case PE_PanelMenu: {
painter->save();
- QColor menuBackground = option->palette.base().color().lighter(108);
+ const QBrush menuBackground = option->palette.base().color().lighter(108);
QColor borderColor = option->palette.background().color().darker(160);
- painter->setPen(borderColor);
- painter->setBrush(menuBackground);
- painter->drawRect(option->rect.adjusted(0, 0, -1, -1));
+ qDrawPlainRect(painter, option->rect, borderColor, 1, &menuBackground);
painter->restore();
}
break;