embeddedwindows: Fill bounds, instead of event rect

The event might come from a partial expose, but we want to
fill the entire bounds of the window, as we're filling with
a gradient.

Change-Id: I66cedb160fb0ed06935c06ba2fe5dec9ed468833
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Liang Qi <liang.qi@qt.io>
(cherry picked from commit 61c043333b255afcd83260b78027242fc27a2e83)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Tor Arne Vestbø 2023-08-15 21:48:05 +02:00 committed by Qt Cherry-pick Bot
parent afbc0c7267
commit da2e47edb0

View File

@ -29,11 +29,12 @@ protected:
update();
}
void paintEvent(QPaintEvent *event) override
void paintEvent(QPaintEvent *) override
{
QPainter painter(this);
painter.setCompositionMode(QPainter::CompositionMode_Source);
painter.fillRect(event->rect(), m_pressed ? QGradient(QGradient::JuicyPeach) : m_brush);
painter.fillRect(QRect(0, 0, width(), height()),
m_pressed ? QGradient(QGradient::JuicyPeach) : m_brush);
}
private: