Changeset 107421 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Jan 6, 2025 4:01:26 PM (4 months ago)
- svn:sync-xref-src-repo-rev:
- 166473
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp
r107420 r107421 1189 1189 QPixmap pixmapMask = uimachine()->cursorMaskPixmap(); 1190 1190 const QPoint hotspot = uimachine()->cursorHotspot(); 1191 uint uXHot = hotspot.x();1192 uint uYHot = hotspot.y();1191 int iXHot = hotspot.x(); 1192 int iYHot = hotspot.y(); 1193 1193 1194 1194 /* If there is no mask: */ … … 1197 1197 /* Scale the shape pixmap and 1198 1198 * compose the cursor on the basis of shape only: */ 1199 updateMousePointerPixmapScaling(pixmapShape, uXHot, uYHot);1200 m_cursor = QCursor(pixmapShape, uXHot, uYHot);1199 updateMousePointerPixmapScaling(pixmapShape, iXHot, iYHot); 1200 m_cursor = QCursor(pixmapShape, iXHot, iYHot); 1201 1201 } 1202 1202 /* Otherwise: */ … … 1205 1205 /* Scale the shape and the mask pixmaps and 1206 1206 * compose the cursor on the basis of shape and mask both: */ 1207 updateMousePointerPixmapScaling(pixmapShape, uXHot, uYHot);1208 /// @todo updateMousePointerPixmapScaling(pixmapMask, uXHot, uYHot);1209 m_cursor = QCursor(QBitmap::fromPixmap(pixmapShape), QBitmap::fromPixmap(pixmapMask), uXHot, uYHot);1207 updateMousePointerPixmapScaling(pixmapShape, iXHot, iYHot); 1208 /// @todo updateMousePointerPixmapScaling(pixmapMask, iXHot, iYHot); 1209 m_cursor = QCursor(QBitmap::fromPixmap(pixmapShape), QBitmap::fromPixmap(pixmapMask), iXHot, iYHot); 1210 1210 } 1211 1211 … … 2196 2196 } 2197 2197 2198 void UIMachineView::updateMousePointerPixmapScaling(QPixmap &pixmap, uint &uXHot, uint &uYHot)2198 void UIMachineView::updateMousePointerPixmapScaling(QPixmap &pixmap, int &iXHot, int &iYHot) 2199 2199 { 2200 2200 #if defined(VBOX_WS_MAC) … … 2208 2208 pixmap = pixmap.scaled(pixmap.width() * dScaleFactor, pixmap.height() * dScaleFactor, 2209 2209 Qt::IgnoreAspectRatio, Qt::SmoothTransformation); 2210 uXHot *= dScaleFactor;2211 uYHot *= dScaleFactor;2210 iXHot *= dScaleFactor; 2211 iYHot *= dScaleFactor; 2212 2212 } 2213 2213 … … 2221 2221 /* Scale the pixmap down: */ 2222 2222 pixmap.setDevicePixelRatio(dDevicePixelRatio); 2223 uXHot /= dDevicePixelRatio;2224 uYHot /= dDevicePixelRatio;2223 iXHot /= dDevicePixelRatio; 2224 iYHot /= dDevicePixelRatio; 2225 2225 } 2226 2226 … … 2253 2253 pixmap = pixmap.scaled(pixmap.width() * dScaleMultiplier, pixmap.height() * dScaleMultiplier, 2254 2254 Qt::IgnoreAspectRatio, Qt::SmoothTransformation); 2255 uXHot *= dScaleMultiplier;2256 uYHot *= dScaleMultiplier;2255 iXHot *= dScaleMultiplier; 2256 iYHot *= dScaleMultiplier; 2257 2257 } 2258 2258 … … 2263 2263 /* Scale the pixmap down: */ 2264 2264 pixmap.setDevicePixelRatio(dDevicePixelRatio); 2265 uXHot /= dDevicePixelRatio;2266 uYHot /= dDevicePixelRatio;2265 iXHot /= dDevicePixelRatio; 2266 iYHot /= dDevicePixelRatio; 2267 2267 } 2268 2268 # endif … … 2271 2271 2272 2272 Q_UNUSED(pixmap); 2273 Q_UNUSED( uXHot);2274 Q_UNUSED( uYHot);2273 Q_UNUSED(iXHot); 2274 Q_UNUSED(iYHot); 2275 2275 2276 2276 #endif -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.h
r106061 r107421 383 383 QSize scaledBackward(QSize size) const; 384 384 385 /** Updates mouse pointer @a pixmap, @a uXHot and @a uYHot according to scaling attributes. */386 void updateMousePointerPixmapScaling(QPixmap &pixmap, uint &uXHot, uint &uYHot);385 /** Updates mouse pointer @a pixmap, @a iXHot and @a iYHot according to scaling attributes. */ 386 void updateMousePointerPixmapScaling(QPixmap &pixmap, int &iXHot, int &iYHot); 387 387 388 388 /* Protected members: */
Note:
See TracChangeset
for help on using the changeset viewer.