diff options
author | Jørgen Lind <jorgen.lind@nokia.com> | 2011-01-26 13:17:08 (GMT) |
---|---|---|
committer | Jørgen Lind <jorgen.lind@nokia.com> | 2011-01-26 13:17:08 (GMT) |
commit | b0390e68893dd04076434695be5e676b87bc067c (patch) | |
tree | 60543fd8cf8c72f530a8865fa8fc2306bb52b9ba /src/gui/text/qtexthtmlparser.cpp | |
parent | 537312d5dea24bd404666789119a5ad1bab04396 (diff) | |
parent | 57a4353c8e082dfc0f536a1e642e4a8df0e5b9c9 (diff) | |
download | Qt-b0390e68893dd04076434695be5e676b87bc067c.zip Qt-b0390e68893dd04076434695be5e676b87bc067c.tar.gz Qt-b0390e68893dd04076434695be5e676b87bc067c.tar.bz2 |
Merge branch 'master' into lighthouse-master
Diffstat (limited to 'src/gui/text/qtexthtmlparser.cpp')
-rw-r--r-- | src/gui/text/qtexthtmlparser.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/gui/text/qtexthtmlparser.cpp b/src/gui/text/qtexthtmlparser.cpp index 5b9ab90..3513a28 100644 --- a/src/gui/text/qtexthtmlparser.cpp +++ b/src/gui/text/qtexthtmlparser.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** @@ -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")) |