Changeset 53863 in vbox
- Timestamp:
- Jan 19, 2015 6:48:18 PM (10 years ago)
- svn:sync-xref-src-repo-rev:
- 97697
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp
r53862 r53863 882 882 /* Finally copy the screen-shot to pause-pixmap: */ 883 883 m_pausePixmap = QPixmap::fromImage(screenShot); 884 #ifdef Q_WS_MAC 885 /* Adjust-backing-scale-factor if necessary: */ 886 const double dBackingScaleFactor = frameBuffer()->backingScaleFactor(); 887 if (dBackingScaleFactor > 1.0 && frameBuffer()->useUnscaledHiDPIOutput()) 888 m_pausePixmap.setDevicePixelRatio(dBackingScaleFactor); 889 #endif /* Q_WS_MAC */ 884 890 885 891 /* Update scaled pause pixmap: */ … … 911 917 /* Finally copy the screen-shot to pause-pixmap: */ 912 918 m_pausePixmap = QPixmap::fromImage(screenShot); 919 #ifdef Q_WS_MAC 920 /* Adjust-backing-scale-factor if necessary: */ 921 const double dBackingScaleFactor = frameBuffer()->backingScaleFactor(); 922 if (dBackingScaleFactor > 1.0 && frameBuffer()->useUnscaledHiDPIOutput()) 923 m_pausePixmap.setDevicePixelRatio(dBackingScaleFactor); 924 #endif /* Q_WS_MAC */ 913 925 914 926 /* Update scaled pause pixmap: */ … … 929 941 /* Update pause pixmap finally: */ 930 942 m_pausePixmapScaled = pausePixmap().scaled(scaledSize, Qt::IgnoreAspectRatio, Qt::SmoothTransformation); 943 #ifdef Q_WS_MAC 944 /* Adjust-backing-scale-factor if necessary: */ 945 const double dBackingScaleFactor = frameBuffer()->backingScaleFactor(); 946 if (dBackingScaleFactor > 1.0 && frameBuffer()->useUnscaledHiDPIOutput()) 947 m_pausePixmapScaled.setDevicePixelRatio(dBackingScaleFactor); 948 #endif /* Q_WS_MAC */ 931 949 } 932 950 … … 1183 1201 /* Take the scale-factor into account: */ 1184 1202 if (gEDataManager->scaleFactor(vboxGlobal().managedVMUuid()) == 1.0) 1185 painter.drawPixmap(rect, pausePixmap(), QRect(rect.x() + contentsX(), rect.y() + contentsY(), 1186 rect.width(), rect.height())); 1203 painter.drawPixmap(rect.topLeft(), pausePixmap()); 1187 1204 else 1188 painter.drawPixmap(rect, pausePixmapScaled(), QRect(rect.x() + contentsX(), rect.y() + contentsY(), 1189 rect.width(), rect.height())); 1205 painter.drawPixmap(rect.topLeft(), pausePixmapScaled()); 1190 1206 #ifdef Q_WS_MAC 1191 1207 /* Update the dock icon: */
Note:
See TracChangeset
for help on using the changeset viewer.