iOS: calculate bounds in desktop view using transformed window bounds for both width...
authorRichard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
Fri, 7 Aug 2015 09:01:09 +0000 (11:01 +0200)
committerTor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Tue, 25 Aug 2015 11:39:22 +0000 (11:39 +0000)
Depending on the orientation, UIKit might shrink either the width or the height
of the view to fit the status bar. Since we anyway want the view to fill the whole
window, we simply ignore this, and use the bounds of the whole window directly.

Task-number: QTBUG-47506
Change-Id: I73294e5792f8d98fb0c0b0a42198207baca08e3c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
src/plugins/platforms/ios/qiosviewcontroller.mm

index 6667ec3dd85c55fe34c7b6bb5bcedb6aec9db6ee..a7068b924629f44395a31fbc431d038f5fd503e3 100644 (file)
 
 - (void)setBounds:(CGRect)newBounds
 {
+    Q_UNUSED(newBounds);
     CGRect transformedWindowBounds = [self convertRect:self.window.bounds fromView:self.window];
-    [super setBounds:CGRectMake(0, 0, CGRectGetWidth(newBounds), CGRectGetHeight(transformedWindowBounds))];
+    [super setBounds:CGRectMake(0, 0, CGRectGetWidth(transformedWindowBounds), CGRectGetHeight(transformedWindowBounds))];
 }
 
 - (void)setCenter:(CGPoint)newCenter