Changeset 70009 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Dec 8, 2017 11:02:07 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
r69958 r70009 1779 1779 /* Create cursor-pixmap from the image: */ 1780 1780 QPixmap cursorPixmap = QPixmap::fromImage(image); 1781 # ifdef VBOX_WS_MAC 1781 1782 # if defined(VBOX_WS_MAC) 1782 1783 /* Adjust device-pixel-ratio: */ 1783 1784 /// @todo In case of multi-monitor setup check whether device-pixel-ratio and cursor are screen specific. … … 1793 1794 cursorPixmap.setDevicePixelRatio(dDevicePixelRatio); 1794 1795 } 1795 # endif /* VBOX_WS_MAC */ 1796 # elif defined(VBOX_WS_X11) 1797 /* Adjust device-pixel-ratio: */ 1798 /// @todo In case of multi-monitor setup check whether device-pixel-ratio and cursor are screen specific. 1799 /* Get screen-id of main-window: */ 1800 const ulong uScreenID = machineLogic()->activeMachineWindow()->screenId(); 1801 /* Get device-pixel-ratio: */ 1802 const double dDevicePixelRatio = frameBuffer(uScreenID)->devicePixelRatio(); 1803 /* Adjust device-pixel-ratio if necessary: */ 1804 if (dDevicePixelRatio > 1.0 && !frameBuffer(uScreenID)->useUnscaledHiDPIOutput()) 1805 { 1806 uXHot *= dDevicePixelRatio; 1807 uYHot *= dDevicePixelRatio; 1808 cursorPixmap = cursorPixmap.scaled(cursorPixmap.width() * dDevicePixelRatio, cursorPixmap.height() * dDevicePixelRatio, 1809 Qt::IgnoreAspectRatio, Qt::SmoothTransformation); 1810 } 1811 # endif /* VBOX_WS_X11 */ 1812 1796 1813 /* Set the new cursor: */ 1797 1814 m_cursor = QCursor(cursorPixmap, uXHot, uYHot);
Note:
See TracChangeset
for help on using the changeset viewer.