diff options
author | Joshua Grauman <jnfo@grauman.com> | 2011-01-04 10:03:32 (GMT) |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2011-01-04 10:03:32 (GMT) |
commit | 254281dae38b932998eb8014a55177948842b78d (patch) | |
tree | 21fe7d7a9758754b6233e426dcc0198e825163c4 /src/gui/text/qcssparser.cpp | |
parent | 5d68753927ac6ba1445ceb6831da7e2346d91bf9 (diff) | |
download | Qt-254281dae38b932998eb8014a55177948842b78d.zip Qt-254281dae38b932998eb8014a55177948842b78d.tar.gz Qt-254281dae38b932998eb8014a55177948842b78d.tar.bz2 |
Add line spacing to QTextBlockFormat, get/set functions, CSS support
The patch adds line spacing options to Qt, as in all modern word
processors. I primarily checked OpenOffice as a reference for how to
position the lines based on the various types of line spacing as well
as where to do the page breaks. The following functions were added:
void QTextBlockFormat::setLineHeight(qreal height, int heightType)
qreal QTextBlockFormat::lineHeight()
int QTextBlockFormat::lineHeightType()
qreal QTextBlockFormat::lineHeight(qreal scriptLineHeight, qreal scaling)
Here are the HeightTypes available:
QTextBlockFormat::SingleHeight
QTextBlockFormat::ProportionalHeight
QTextBlockFormat::FixedHeight
QTextBlockFormat::AtLeastHeight
QTextBlockFormat::LineDistanceHeight
The following CSS syntax was added:
line-height:150%
line-height:40px
line-height:normal
line-height:40al
line-height:40ld
Merge-request: 2305
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
Diffstat (limited to 'src/gui/text/qcssparser.cpp')
-rw-r--r-- | src/gui/text/qcssparser.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gui/text/qcssparser.cpp b/src/gui/text/qcssparser.cpp index dafc8e7..edb08ae 100644 --- a/src/gui/text/qcssparser.cpp +++ b/src/gui/text/qcssparser.cpp @@ -122,6 +122,7 @@ static const QCssKnownValue properties[NumProperties - 1] = { { "image", QtImage }, { "image-position", QtImageAlignment }, { "left", Left }, + { "line-height", LineHeight }, { "list-style", ListStyle }, { "list-style-type", ListStyleType }, { "margin" , Margin }, |