diff options
author | Andrew den Exter <andrew.den-exter@nokia.com> | 2012-01-04 16:12:17 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-01-05 00:55:28 +0100 |
commit | 82803517a68ee6d6111fb71ba5cf44e9aa302b5f (patch) | |
tree | d383a92bc1e6ed94a9b9108ee94aaf7c0a66bc89 /src | |
parent | f9c10b52dda4fe9a46a436edafaf0c2c199a0980 (diff) |
Fix clipping of TextInput contents.
The boundingRect represents the clip rectangle of an item rather than
the size and position of its unclipped content. This would prevent any
content from being clipped except the boundingRect is only re-evaluated
when the size of the item changes so the content is instead clipped to
the size of the original content.
Task-number: QTBUG-23422
Change-Id: I96f830f833129b3230f65452db67b00028c40d6a
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/quick/items/qquicktextinput.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/quick/items/qquicktextinput.cpp b/src/quick/items/qquicktextinput.cpp index b8763fd015..8cc87c3828 100644 --- a/src/quick/items/qquicktextinput.cpp +++ b/src/quick/items/qquicktextinput.cpp @@ -2307,13 +2307,11 @@ QRectF QQuickTextInput::boundingRect() const { Q_D(const QQuickTextInput); - QRectF r = d->boundingRect; int cursorWidth = d->cursorItem ? d->cursorItem->width() : d->m_cursorWidth; // Could include font max left/right bearings to either side of rectangle. - + QRectF r = QQuickImplicitSizeItem::boundingRect(); r.setRight(r.right() + cursorWidth); - r.translate(-d->hscroll, -d->vscroll); return r; } |