From ce60d9965e0dda6f925dfea70b6275dfd79e789b Mon Sep 17 00:00:00 2001 From: Gabriel de Dietrich Date: Mon, 15 Jan 2018 17:27:04 -0800 Subject: [PATCH] QFusionStyle: Properly draw frameless editable combo boxes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: If0b6f15dc0a1de38edec5b360b1b8b698d6ad5b8 Task-number: QTBUG-65728 Reviewed-by: Friedemann Kleint Reviewed-by: Morten Johan Sørvig --- src/widgets/styles/qfusionstyle.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/widgets/styles/qfusionstyle.cpp b/src/widgets/styles/qfusionstyle.cpp index a2b94d59d4..26f651906a 100644 --- a/src/widgets/styles/qfusionstyle.cpp +++ b/src/widgets/styles/qfusionstyle.cpp @@ -2737,6 +2737,8 @@ void QFusionStyle::drawComplexControl(ComplexControl control, const QStyleOption pixmapName += QLatin1String("-editable"); if (isEnabled) pixmapName += QLatin1String("-enabled"); + if (!comboBox->frame) + pixmapName += QLatin1String("-frameless"); if (!QPixmapCache::find(pixmapName, cache)) { cache = styleCachePixmap(comboBox->rect.size()); @@ -2762,7 +2764,8 @@ void QFusionStyle::drawComplexControl(ComplexControl control, const QStyleOption buttonOption.state &= ~State_MouseOver; } - proxy()->drawPrimitive(PE_FrameLineEdit, &buttonOption, &cachePainter, widget); + if (comboBox->frame) + proxy()->drawPrimitive(PE_FrameLineEdit, &buttonOption, &cachePainter, widget); // Draw button clipped cachePainter.save();