VirtualBox

Changeset 55726 in vbox for trunk


Ignore:
Timestamp:
May 7, 2015 1:53:34 PM (10 years ago)
Author:
vboxsync
Message:

FE/Qt: 6278: Runtime UI: Fetch the extra-data HiDPI optimization type on-the-fly.

Location:
trunk/src/VBox/Frontends/VirtualBox/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp

    r55454 r55726  
    36903690        else if (strKey == GUI_Scaling_Optimization)
    36913691            emit sigScalingOptimizationTypeChange(strMachineID);
     3692        /* HiDPI optimization type change: */
     3693        else if (strKey == GUI_HiDPI_Optimization)
     3694            emit sigHiDPIOptimizationTypeChange(strMachineID);
    36923695        /* Unscaled HiDPI Output mode change: */
    36933696        else if (strKey == GUI_HiDPI_UnscaledOutput)
  • trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.h

    r55401 r55726  
    8282    /** Notifies about the scaling optimization type change. */
    8383    void sigScalingOptimizationTypeChange(const QString &strMachineID);
     84
     85    /** Notifies about the HiDPI optimization type change. */
     86    void sigHiDPIOptimizationTypeChange(const QString &strMachineID);
    8487
    8588    /** Notifies about unscaled HiDPI output mode change. */
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp

    r55724 r55726  
    408408        return;
    409409
    410     /* Take the scale-factor into account: */
     410    /* Take the scaling-optimization type into account: */
    411411    frameBuffer()->setScalingOptimizationType(gEDataManager->scalingOptimizationType(vboxGlobal().managedVMUuid()));
     412
     413    /* Update viewport: */
     414    viewport()->update();
     415}
     416
     417void UIMachineView::sltHandleHiDPIOptimizationChange(const QString &strMachineID)
     418{
     419    /* Skip unrelated machine IDs: */
     420    if (strMachineID != vboxGlobal().managedVMUuid())
     421        return;
     422
     423    /* Take the HiDPI-optimization type into account: */
     424    frameBuffer()->setHiDPIOptimizationType(gEDataManager->hiDPIOptimizationType(vboxGlobal().managedVMUuid()));
    412425
    413426    /* Update viewport: */
     
    694707    connect(gEDataManager, SIGNAL(sigScalingOptimizationTypeChange(const QString&)),
    695708            this, SLOT(sltHandleScalingOptimizationChange(const QString&)));
     709    /* HiDPI-optimization change: */
     710    connect(gEDataManager, SIGNAL(sigHiDPIOptimizationTypeChange(const QString&)),
     711            this, SLOT(sltHandleHiDPIOptimizationChange(const QString&)));
    696712    /* Unscaled HiDPI output mode change: */
    697713    connect(gEDataManager, SIGNAL(sigUnscaledHiDPIOutputModeChange(const QString&)),
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.h

    r55401 r55726  
    126126    /** Handles the scaling-optimization change. */
    127127    void sltHandleScalingOptimizationChange(const QString &strMachineID);
     128
     129    /** Handles the HiDPI-optimization change. */
     130    void sltHandleHiDPIOptimizationChange(const QString &strMachineID);
    128131
    129132    /** Handles the unscaled HiDPI output mode change. */
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