Changeset 53959 in vbox
- Timestamp:
- Jan 26, 2015 12:02:51 PM (10 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.cpp
r53954 r53959 700 700 /* Update scaled-size according scale-factor for modes except the 'Scale' one: */ 701 701 if (m_pMachineView->machineLogic()->visualStateType() != UIVisualStateType_Scale) 702 setScaledSize(scaleFactor() == 1.0 ? QSize() : QSize( m_iWidth * scaleFactor(), m_iHeight * scaleFactor()));702 setScaledSize(scaleFactor() == 1.0 ? QSize() : QSize((int)(m_iWidth * scaleFactor()), (int)(m_iHeight * scaleFactor()))); 703 703 } 704 704 … … 778 778 779 779 /* Update scaled-size according scale-factor: */ 780 setScaledSize(scaleFactor() == 1.0 ? QSize() : QSize( m_iWidth * scaleFactor(), m_iHeight * scaleFactor()));780 setScaledSize(scaleFactor() == 1.0 ? QSize() : QSize((int)(m_iWidth * scaleFactor()), (int)(m_iHeight * scaleFactor()))); 781 781 782 782 /* Update coordinate-system: */ … … 971 971 { 972 972 /* Adjust sub-pixmap: */ 973 subPixmap = QPixmap( rect.width() * dBackingScaleFactor,974 rect.height() * dBackingScaleFactor);973 subPixmap = QPixmap((int)(rect.width() * dBackingScaleFactor), 974 (int)(rect.height() * dBackingScaleFactor)); 975 975 } 976 976 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMouseHandler.cpp
r53931 r53959 937 937 const double xScaleFactor = (double)scaledSize.width() / pFrameBuffer->width(); 938 938 const double yScaleFactor = (double)scaledSize.height() / pFrameBuffer->height(); 939 cpnt.setX( cpnt.x() / xScaleFactor);940 cpnt.setY( cpnt.y() / yScaleFactor);939 cpnt.setX((int)(cpnt.x() / xScaleFactor)); 940 cpnt.setY((int)(cpnt.y() / yScaleFactor)); 941 941 } 942 942 } … … 949 949 if (dBackingScaleFactor > 1.0) 950 950 { 951 cpnt.setX( cpnt.x() * dBackingScaleFactor);952 cpnt.setY( cpnt.y() * dBackingScaleFactor);951 cpnt.setX((int)(cpnt.x() * dBackingScaleFactor)); 952 cpnt.setY((int)(cpnt.y() * dBackingScaleFactor)); 953 953 } 954 954 }
Note:
See TracChangeset
for help on using the changeset viewer.