diff options
author | Morten Johan Sørvig <morten.sorvig@qt.io> | 2017-11-20 13:26:31 +0100 |
---|---|---|
committer | Morten Johan Sørvig <morten.sorvig@qt.io> | 2017-11-22 08:45:55 +0000 |
commit | bdf1045b715e43eaedd1d9c4de78c4d7ce0e28ba (patch) | |
tree | 84722764b23c14aa3888fc8e58ba68f5d1012518 /src/plugins | |
parent | 1ea0b47c2eaf81ba4a13b89343719dcefdb90ce3 (diff) |
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>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/platforms/cocoa/qnsview.mm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/plugins/platforms/cocoa/qnsview.mm b/src/plugins/platforms/cocoa/qnsview.mm index 28ffcf8718..c888551729 100644 --- a/src/plugins/platforms/cocoa/qnsview.mm +++ b/src/plugins/platforms/cocoa/qnsview.mm @@ -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; |