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>
This commit is contained in:
parent
364240ed11
commit
81b33a8252
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user