summaryrefslogtreecommitdiffstats
path: root/src/widgets/styles
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@qt.io>2019-05-27 14:35:18 +0200
committerAndy Shaw <andy.shaw@qt.io>2019-05-27 14:35:18 +0200
commit81b33a8252d8a69277782f51c9c7401c7009c72e (patch)
tree4d4156d4207dc8649e6ea86067d174851d21ee67 /src/widgets/styles
parent364240ed11f5f72341d9e2fa5009baecb4398b1b (diff)
Fusion: Fill the rect with base brush when drawing the combobox frame
Instead of doing this directly inside the PE_FrameLineEdit as this can be used directly when a stylesheet is set the rect of the lineedit used in the combobox in fusion style is filled directly with the base brush. This ensures it still renders the background correctly when using fusion style, but enables stylesheets to work as it will not override that if the background is set in a stylesheet for a combobox. Fixes: QTBUG-75816 Change-Id: I50a0600b500088ebcf1d70a02f9c74c6040d34d9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'src/widgets/styles')
-rw-r--r--src/widgets/styles/qfusionstyle.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/widgets/styles/qfusionstyle.cpp b/src/widgets/styles/qfusionstyle.cpp
index c565932889..64954dc833 100644
--- a/src/widgets/styles/qfusionstyle.cpp
+++ b/src/widgets/styles/qfusionstyle.cpp
@@ -2769,8 +2769,16 @@ void QFusionStyle::drawComplexControl(ComplexControl control, const QStyleOption
buttonOption.state &= ~State_MouseOver;
}
- if (comboBox->frame)
+ if (comboBox->frame) {
+ cachePainter.save();
+ cachePainter.setRenderHint(QPainter::Antialiasing, true);
+ cachePainter.translate(0.5, 0.5);
+ cachePainter.setPen(Qt::NoPen);
+ cachePainter.setBrush(buttonOption.palette.base());
+ cachePainter.drawRoundedRect(rect.adjusted(0, 0, -1, -1), 2, 2);
+ cachePainter.restore();
proxy()->drawPrimitive(PE_FrameLineEdit, &buttonOption, &cachePainter, widget);
+ }
// Draw button clipped
cachePainter.save();