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>bb10
parent
996d78d4c9
commit
2e13285446
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue