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:
parent
1ea0b47c2e
commit
bdf1045b71
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user