summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qtexthtmlparser.cpp
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2021-10-12 13:46:24 +0200
committerShawn Rutledge <shawn.rutledge@qt.io>2021-10-14 17:09:20 +0200
commit5c436365f579f820344566101e746e244672995a (patch)
tree38fd5c22de7d6474ae000d3983616aa1fb3d9246 /src/gui/text/qtexthtmlparser.cpp
parentf83a3c4b6e703d3d6b48f2f8d2f71ab69c084b8f (diff)
Support background-color CSS styling on <hr/>
[ChangeLog][QtGui][CSS] The background-color style can now be applied to <hr/> to set the rule color. Task-number: QTBUG-74342 Change-Id: Ib960ce4d38caa225f258b6d228fb794cef43e1b7 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Diffstat (limited to 'src/gui/text/qtexthtmlparser.cpp')
-rw-r--r--src/gui/text/qtexthtmlparser.cpp2
1 files changed, 2 insertions, 0 deletions
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<QCss::Declaration> &d
applyBackgroundImage(bgImage, resourceProvider);
} else if (bgBrush.style() != Qt::NoBrush) {
charFormat.setBackground(bgBrush);
+ if (id == Html_hr)
+ blockFormat.setProperty(QTextFormat::BackgroundBrush, bgBrush);
}
}
}