diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2011-01-10 13:11:30 (GMT) |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2011-01-10 13:11:30 (GMT) |
commit | 3263f8036128cc4403cf6383324f5390eecee13b (patch) | |
tree | 227ea1dfe86b9297cf7808b5b304a039c438e1fe /src/gui/text/qtexthtmlparser.cpp | |
parent | 4d53a691aaac9789ddd4f9d4e968d28ace2181ca (diff) | |
parent | 0faab4442040fdfe3790e3c02808fd45993f0265 (diff) | |
download | Qt-3263f8036128cc4403cf6383324f5390eecee13b.zip Qt-3263f8036128cc4403cf6383324f5390eecee13b.tar.gz Qt-3263f8036128cc4403cf6383324f5390eecee13b.tar.bz2 |
Merge branch 'qt-graphics-team-text-master'
Diffstat (limited to 'src/gui/text/qtexthtmlparser.cpp')
-rw-r--r-- | src/gui/text/qtexthtmlparser.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gui/text/qtexthtmlparser.cpp b/src/gui/text/qtexthtmlparser.cpp index 5b9ab90..5d5e2b6 100644 --- a/src/gui/text/qtexthtmlparser.cpp +++ b/src/gui/text/qtexthtmlparser.cpp @@ -1250,6 +1250,20 @@ void QTextHtmlParserNode::applyCssDeclarations(const QVector<QCss::Declaration> case QCss::QtBlockIndent: blockFormat.setIndent(decl.d->values.first().variant.toInt()); break; + case QCss::LineHeight: { + qreal lineHeight; + if (decl.realValue(&lineHeight, "px")) { + blockFormat.setLineHeight(lineHeight, QTextBlockFormat::FixedHeight); + } else { + bool ok; + QString value = decl.d->values.first().toString(); + lineHeight = value.toDouble(&ok); + if (ok) + blockFormat.setLineHeight(lineHeight, QTextBlockFormat::ProportionalHeight); + else + blockFormat.setLineHeight(0, QTextBlockFormat::SingleHeight); + } + break; } case QCss::TextIndent: { qreal indent = 0; if (decl.realValue(&indent, "px")) |