QFusionStyle: Properly draw frameless editable combo boxes

Change-Id: If0b6f15dc0a1de38edec5b360b1b8b698d6ad5b8
Task-number: QTBUG-65728
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
This commit is contained in:
Gabriel de Dietrich 2018-01-15 17:27:04 -08:00
parent ae3a65122f
commit ce60d9965e

View File

@ -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();