From 5c436365f579f820344566101e746e244672995a Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Tue, 12 Oct 2021 13:46:24 +0200 Subject: Support background-color CSS styling on
[ChangeLog][QtGui][CSS] The background-color style can now be applied to
to set the rule color. Task-number: QTBUG-74342 Change-Id: Ib960ce4d38caa225f258b6d228fb794cef43e1b7 Reviewed-by: Eskil Abrahamsen Blomfeldt --- src/gui/text/qtexthtmlparser.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/gui/text/qtexthtmlparser.cpp') diff --git a/src/gui/text/qtexthtmlparser.cpp b/src/gui/text/qtexthtmlparser.cpp index 6a9f7d3a96..ae2550b69e 100644 --- a/src/gui/text/qtexthtmlparser.cpp +++ b/src/gui/text/qtexthtmlparser.cpp @@ -1453,6 +1453,8 @@ void QTextHtmlParserNode::applyCssDeclarations(const QList &d applyBackgroundImage(bgImage, resourceProvider); } else if (bgBrush.style() != Qt::NoBrush) { charFormat.setBackground(bgBrush); + if (id == Html_hr) + blockFormat.setProperty(QTextFormat::BackgroundBrush, bgBrush); } } } -- cgit v1.2.3