diff options
author | Alan Alpert <alan.alpert@nokia.com> | 2009-07-09 06:40:15 (GMT) |
---|---|---|
committer | Alan Alpert <alan.alpert@nokia.com> | 2009-07-09 06:40:15 (GMT) |
commit | ce0ff6de3d6f8715f6b7d18cdcb2f4b6a3a0c548 (patch) | |
tree | 84ce25c23e43834b52f38fb1b7458e39cde9035e /src/declarative/fx/qfxtextedit.cpp | |
parent | 7343bbb230161d563b0226011e4519f695fdc593 (diff) | |
download | Qt-ce0ff6de3d6f8715f6b7d18cdcb2f4b6a3a0c548.zip Qt-ce0ff6de3d6f8715f6b7d18cdcb2f4b6a3a0c548.tar.gz Qt-ce0ff6de3d6f8715f6b7d18cdcb2f4b6a3a0c548.tar.bz2 |
Fix QFxTextEdit cursor delegate for multi-line and font changes
They weren't handled before, and now they are.
Diffstat (limited to 'src/declarative/fx/qfxtextedit.cpp')
-rw-r--r-- | src/declarative/fx/qfxtextedit.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/declarative/fx/qfxtextedit.cpp b/src/declarative/fx/qfxtextedit.cpp index 87a27d9..ef56cc8 100644 --- a/src/declarative/fx/qfxtextedit.cpp +++ b/src/declarative/fx/qfxtextedit.cpp @@ -538,6 +538,7 @@ void QFxTextEdit::loadCursorDelegate() d->control->setCursorWidth(0); dirtyCache(cursorRect()); d->cursor->setItemParent(this); + d->cursor->setHeight(QFontMetrics(d->font.font()).height()); moveCursorDelegate(); }else{ qWarning() << "Error loading cursor delegate for TextEdit:" + objectName(); @@ -1020,6 +1021,10 @@ void QFxTextEdit::fontChanged() Q_D(QFxTextEdit); clearCache(); d->document->setDefaultFont(d->font.font()); + if(d->cursor){ + d->cursor->setHeight(QFontMetrics(d->font.font()).height()); + moveCursorDelegate(); + } updateSize(); emit update(); } |