VirtualBox

Changeset 53388 in vbox for trunk


Ignore:
Timestamp:
Nov 24, 2014 2:49:24 PM (10 years ago)
Author:
vboxsync
Message:

FE/Qt: 6278: Support for scaled video-output: Forgot to update scroll-bars in r96997; Small cleanup.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp

    r53372 r53388  
    186186
    187187    /* Take the scale-factor into account: */
    188     const double dScaleFactor = gEDataManager->scaleFactor(vboxGlobal().managedVMUuid());
    189     newSize /= dScaleFactor;
     188    newSize /= gEDataManager->scaleFactor(vboxGlobal().managedVMUuid());
    190189
    191190    /* Expand current limitations: */
     
    219218    {
    220219        /* Check if that notify-change brings actual resize-event: */
    221         const bool fActualResize = frameBuffer()->width() != iWidth ||
    222                                    frameBuffer()->height() != iHeight;
     220        const bool fActualResize = frameBuffer()->width() != (ulong)iWidth ||
     221                                   frameBuffer()->height() != (ulong)iHeight;
    223222
    224223        /* Adjust 'scale' mode to current machine-view size: */
     
    648647
    649648    /* Take the scale-factor into account: */
    650     const double dScaleFactor = gEDataManager->scaleFactor(vboxGlobal().managedVMUuid());
    651     size *= dScaleFactor;
     649    size *= gEDataManager->scaleFactor(vboxGlobal().managedVMUuid());
    652650
    653651#ifdef VBOX_WITH_DEBUGGER_GUI
     
    732730
    733731    /* Take the scale-factor into account: */
    734     const double dScaleFactor = gEDataManager->scaleFactor(vboxGlobal().managedVMUuid());
    735     size *= dScaleFactor;
     732    size *= gEDataManager->scaleFactor(vboxGlobal().managedVMUuid());
    736733
    737734    /* Return size: */
     
    839836
    840837    QSize v = QSize(frameBuffer()->width(), frameBuffer()->height());
     838
     839    /* Take the scale-factor into account: */
     840    v *= gEDataManager->scaleFactor(vboxGlobal().managedVMUuid());
     841
    841842    /* No scroll bars needed: */
    842843    if (m.expandedTo(v) == m)
     
    10701071        QPainter painter(viewport());
    10711072        /* Take the scale-factor into account: */
    1072         const double dScaleFactor = gEDataManager->scaleFactor(vboxGlobal().managedVMUuid());
    1073         if (dScaleFactor == 1)
     1073        if (gEDataManager->scaleFactor(vboxGlobal().managedVMUuid()) == 1)
    10741074            painter.drawPixmap(rect, pausePixmap(), QRect(rect.x() + contentsX(), rect.y() + contentsY(),
    10751075                                                          rect.width(), rect.height()));
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette