Cocoa: Update layer contentsScale on screen change

Failure to do so will result in displaying the layer
contents on a quarter of the window when moving the
window from a 2x screen to a 1x screen.

Task-number: QTBUG-64494
Change-Id: I57ce98025e841549f62d132d4985e727898e6207
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
Morten Johan Sørvig 2017-11-20 13:26:31 +01:00
parent 1ea0b47c2e
commit bdf1045b71

View File

@ -353,6 +353,12 @@ Q_LOGGING_CATEGORY(lcQpaTablet, "qt.qpa.input.tablet")
m_platformWindow->handleExposeEvent(QRectF::fromCGRect(self.bounds).toRect());
}
- (void)viewDidChangeBackingProperties
{
if (self.layer)
self.layer.contentsScale = self.window.backingScaleFactor;
}
- (BOOL)isFlipped
{
return YES;