diff options
author | Tor Arne Vestbø <tor.arne.vestbo@digia.com> | 2014-12-12 15:14:04 +0100 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com> | 2015-01-07 21:32:04 +0100 |
commit | 8f9ced985727136dc7d1502b7212a54f65b8b113 (patch) | |
tree | f311e64c79920c06b9e93bef0cd1bf1667a3184b /src/plugins/platforms/ios/qiosviewcontroller.mm | |
parent | 83bd9393e5564ea9168fda90c0f44456633a483a (diff) |
iOS: Raise window level instead of hiding statusbar during VKB scroll
Hiding the statusbar using the normal iOS APIs result in QScreen
reporting new availableGeometry, which is not what we want. The
scroll of the screen is a purely visual effect, and shouldn't
have any effect on observable Qt APIs besides the keyboard rect
changing.
Instead of actually hiding the statusbar, we achieve the same
effect by raising the key window (and any other application
windows, including the keyboard) to the level of the statusbar,
effectively putting them above the statusbar. This still leaves
popups and alert windows above the key window, as normal.
Change-Id: Ib7694240ca86cfb9000de35bf0c49343ffb37e32
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Diffstat (limited to 'src/plugins/platforms/ios/qiosviewcontroller.mm')
-rw-r--r-- | src/plugins/platforms/ios/qiosviewcontroller.mm | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/plugins/platforms/ios/qiosviewcontroller.mm b/src/plugins/platforms/ios/qiosviewcontroller.mm index a2d81e3b6c..f678f7e807 100644 --- a/src/plugins/platforms/ios/qiosviewcontroller.mm +++ b/src/plugins/platforms/ios/qiosviewcontroller.mm @@ -281,14 +281,8 @@ // All decisions are based on the the top level window focusWindow = qt_window_private(focusWindow)->topLevelWindow(); - bool hasScrolledRootViewDueToVirtualKeyboard = - !CATransform3DIsIdentity(self.view.layer.sublayerTransform); - bool currentStatusBarVisibility = self.prefersStatusBarHidden; - self.prefersStatusBarHidden = focusWindow->windowState() == Qt::WindowFullScreen - || hasScrolledRootViewDueToVirtualKeyboard; - self.preferredStatusBarUpdateAnimation = hasScrolledRootViewDueToVirtualKeyboard ? - UIStatusBarAnimationFade : UIStatusBarAnimationNone; + self.prefersStatusBarHidden = focusWindow->windowState() == Qt::WindowFullScreen; if (self.prefersStatusBarHidden != currentStatusBarVisibility) { #if QT_IOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__IPHONE_7_0) |