scene: Change clear color in ItemRendererQPainter
It makes the behavior of the ItemRendererQPainter compatible with the behavior of the ItemRendererOpenGL. It is needed to ensure that the cursor layer is properly cleared too.
This commit is contained in:
parent
09e0fa5eb8
commit
977016b743
1 changed files with 3 additions and 1 deletions
|
@ -41,9 +41,11 @@ void ItemRendererQPainter::endFrame()
|
|||
|
||||
void ItemRendererQPainter::renderBackground(const QRegion ®ion)
|
||||
{
|
||||
m_painter->setCompositionMode(QPainter::CompositionMode_Source);
|
||||
for (const QRect &rect : region) {
|
||||
m_painter->fillRect(rect, Qt::black);
|
||||
m_painter->fillRect(rect, Qt::transparent);
|
||||
}
|
||||
m_painter->setCompositionMode(QPainter::CompositionMode_SourceOver);
|
||||
}
|
||||
|
||||
void ItemRendererQPainter::renderItem(Item *item, int mask, const QRegion &_region, const WindowPaintData &data)
|
||||
|
|
Loading…
Reference in a new issue