summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/ios/qiosinputcontext.h
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@digia.com>2013-12-11 12:16:19 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-02-06 14:19:19 +0100
commitd44b6da7c243ded8a5cae1d0e2a77c8ef74c33f6 (patch)
tree20d7d1b897cbd14e95c2b1fcf2303dd8d65a75e0 /src/plugins/platforms/ios/qiosinputcontext.h
parentf864bdaf592412acccae6b6c561a76bbfe35a1f0 (diff)
iOS: change logic for when to scroll screen
The current implementation will stop scrolling the screen to reveal the cursor if the input item changes transformation. This to not interfere with flicking etc. This strategy turns out to be too strict, as some qml apps/games can easily have small animations applied (e.g qtquick cork board example) that moves or scales the text areas (or their parents) upon focus. So instead of relying on input item transformation, we now scroll whenever the cursor changes position inside the input item (in addition to orientation changes etc). We also refactor scrollRootView into two functions, since we in many cases know if the keyboard should scroll up or down already when the call is made. Change-Id: If5bf349139eed69823cfc8986bb4b32c93bdf91b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Diffstat (limited to 'src/plugins/platforms/ios/qiosinputcontext.h')
-rw-r--r--src/plugins/platforms/ios/qiosinputcontext.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/platforms/ios/qiosinputcontext.h b/src/plugins/platforms/ios/qiosinputcontext.h
index 533ba686e1..91a6939ad4 100644
--- a/src/plugins/platforms/ios/qiosinputcontext.h
+++ b/src/plugins/platforms/ios/qiosinputcontext.h
@@ -64,14 +64,14 @@ public:
void setFocusObject(QObject *object);
void focusWindowChanged(QWindow *focusWindow);
- void scrollRootView();
-
+ void cursorRectangleChanged();
+ void scrollToCursor();
+ void scroll(int y);
private:
QIOSKeyboardListener *m_keyboardListener;
UIView<UIKeyInput> *m_focusView;
- QTransform m_inputItemTransform;
bool m_hasPendingHideRequest;
- bool m_inSetFocusObject;
+ QObject *m_focusObject;
};
QT_END_NAMESPACE