diff options
author | Andrew den Exter <andrew.den-exter@nokia.com> | 2012-06-19 11:30:59 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-06-25 08:57:36 +0200 |
commit | 3ae9c8c36097abffd73e29cea1b897ca7d704916 (patch) | |
tree | 0657805f357206636bd37b9b95e6d4557ce6473c /src/quick/items/qquicktextutil_p.h | |
parent | 31ba131f9b166ef857f8559a23429d99609e6669 (diff) |
Fix clicking on links in aligned or elided Text.
Adjust the mouse position to compensate for any alignment offsets
and test the elided text layout for anchors if none is found in
the normal layout.
Change-Id: Idfda3f7e372d0f2d6c1b7bb5f22d7015d52e8239
Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
Diffstat (limited to 'src/quick/items/qquicktextutil_p.h')
-rw-r--r-- | src/quick/items/qquicktextutil_p.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/quick/items/qquicktextutil_p.h b/src/quick/items/qquicktextutil_p.h index 91ef40b221..d6c05aac3b 100644 --- a/src/quick/items/qquicktextutil_p.h +++ b/src/quick/items/qquicktextutil_p.h @@ -66,12 +66,16 @@ public: template <typename Private> static void setCursorDelegate(Private *d, QQmlComponent *delegate); template <typename Private> static void createCursor(Private *d); + static qreal alignedX(const QRectF &rect, qreal width, int alignment); + static qreal alignedY(const QRectF &rect, qreal height, int alignment); + private: static QQuickItem *createCursor( QQmlComponent *component, QQuickItem *parent, const QRectF &cursorRectangle, const char *className); + }; template <typename Private> |