Commit f9fb0bc2 authored by mae's avatar mae
Browse files

Fix background of folded-block popups

If the disabled code format in creator does not have a background
defined, we now use the page's default background.
parent 08e4c30e
......@@ -2773,7 +2773,10 @@ void BaseTextEditor::paintEvent(QPaintEvent *e)
painter.save();
painter.setRenderHint(QPainter::Antialiasing, true);
painter.translate(.5, .5);
painter.setBrush(d->m_ifdefedOutFormat.background());
QBrush brush = baseColor;
if (d->m_ifdefedOutFormat.hasProperty(QTextFormat::BackgroundBrush))
brush = d->m_ifdefedOutFormat.background();
painter.setBrush(brush);
painter.drawRoundedRect(QRectF(visibleCollapsedBlockOffset.x(),
visibleCollapsedBlockOffset.y(),
maxWidth, blockHeight).adjusted(0, 0, 0, 0), 3, 3);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment