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:
Vlad Zahorodnii 2022-12-19 11:48:37 +02:00
parent 09e0fa5eb8
commit 977016b743

View file

@ -41,9 +41,11 @@ void ItemRendererQPainter::endFrame()
void ItemRendererQPainter::renderBackground(const QRegion &region)
{
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)