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. Pick-to: 6.6 Change-Id: I66cedb160fb0ed06935c06ba2fe5dec9ed468833 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Liang Qi <liang.qi@qt.io>
This commit is contained in:
parent
4e2e3a6b4f
commit
61c043333b
@ -29,11 +29,12 @@ protected:
|
|||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
void paintEvent(QPaintEvent *event) override
|
void paintEvent(QPaintEvent *) override
|
||||||
{
|
{
|
||||||
QPainter painter(this);
|
QPainter painter(this);
|
||||||
painter.setCompositionMode(QPainter::CompositionMode_Source);
|
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:
|
private:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user