forked from qt-creator/qt-creator
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.
This commit is contained in:
@@ -2773,7 +2773,10 @@ void BaseTextEditor::paintEvent(QPaintEvent *e)
|
|||||||
painter.save();
|
painter.save();
|
||||||
painter.setRenderHint(QPainter::Antialiasing, true);
|
painter.setRenderHint(QPainter::Antialiasing, true);
|
||||||
painter.translate(.5, .5);
|
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(),
|
painter.drawRoundedRect(QRectF(visibleCollapsedBlockOffset.x(),
|
||||||
visibleCollapsedBlockOffset.y(),
|
visibleCollapsedBlockOffset.y(),
|
||||||
maxWidth, blockHeight).adjusted(0, 0, 0, 0), 3, 3);
|
maxWidth, blockHeight).adjusted(0, 0, 0, 0), 3, 3);
|
||||||
|
|||||||
Reference in New Issue
Block a user