diff options
author | Richard Moe Gustavsen <richard.gustavsen@digia.com> | 2013-11-26 11:13:56 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-12-04 14:50:43 +0100 |
commit | 2e132854460e11a1ade516f61477723202d56a93 (patch) | |
tree | 47378ecd8b41d905681e77414012ffeff67a562b | |
parent | 996d78d4c94a0116eecec160caf605ea3629f36c (diff) | |
download | qtbase-2e132854460e11a1ade516f61477723202d56a93.tar.gz |
iOS: don't show statusbar if hidden from Info.plist
Currently there is no way to always hide the statusbar
on iOS other than showing a window in fullscreen. This
patch will check if the statusbar is (initially) hidden
from the Info.plist, and respect that in the application.
SubAttack is an example of an app that (because
of styling issues with MainWindow margins) manually
sets the geometry larger than fullsreen, and calls
showNormal(). In that case we still want the statusbar to be
hidden.
Change-Id: Ia365d14971978360d0b39621ff0f8f82f74b57e2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
-rw-r--r-- | src/plugins/platforms/ios/qiosviewcontroller.mm | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/platforms/ios/qiosviewcontroller.mm b/src/plugins/platforms/ios/qiosviewcontroller.mm index 9a9fba5a8e..0a6a00b753 100644 --- a/src/plugins/platforms/ios/qiosviewcontroller.mm +++ b/src/plugins/platforms/ios/qiosviewcontroller.mm @@ -101,6 +101,9 @@ - (BOOL)prefersStatusBarHidden { + static bool hiddenFromPlist = infoPlistValue(@"UIStatusBarHidden", false); + if (hiddenFromPlist) + return YES; QWindow *focusWindow = QGuiApplication::focusWindow(); if (!focusWindow || !focusWindow->handle()) return [UIApplication sharedApplication].statusBarHidden; |