VirtualBox

Changeset 53465 in vbox for trunk/src


Ignore:
Timestamp:
Dec 5, 2014 3:47:11 PM (10 years ago)
Author:
vboxsync
Message:

FE/Qt: Mac OS X: 6278: Support for unscaled HiDPI (Retina) video-output: Machine settings: Display page: Machine Window tab extended with check-box for that option.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.cpp

    r53401 r53465  
    143143    /* Cache Machine Window data: */
    144144    displayData.m_dScaleFactor = gEDataManager->scaleFactor(m_machine.GetId());
     145#ifdef Q_WS_MAC
     146    displayData.m_fUseUnscaledHiDPIOutput = gEDataManager->useUnscaledHiDPIOutput(m_machine.GetId());
     147#endif /* Q_WS_MAC */
    145148    displayData.m_fShowMiniToolBar = gEDataManager->miniToolbarEnabled(m_machine.GetId());
    146149    displayData.m_fMiniToolBarAtTop = gEDataManager->miniToolbarAlignment(m_machine.GetId()) == Qt::AlignTop;
     
    199202    m_pMenuBarEditor->setActionPool(m_pActionPool);
    200203    m_pEditorGuestScreenScale->setValue(displayData.m_dScaleFactor * 100);
     204#ifdef Q_WS_MAC
     205    m_pCheckBoxUnscaledHiDPIOutput->setChecked(displayData.m_fUseUnscaledHiDPIOutput);
     206#endif /* Q_WS_MAC */
    201207    m_pCheckBoxShowMiniToolBar->setChecked(displayData.m_fShowMiniToolBar);
    202208    m_pComboToolBarAlignment->setChecked(displayData.m_fMiniToolBarAtTop);
     
    246252    /* Gather Machine Window data from page: */
    247253    displayData.m_dScaleFactor = (double)m_pEditorGuestScreenScale->value() / 100;
     254#ifdef Q_WS_MAC
     255    displayData.m_fUseUnscaledHiDPIOutput = m_pCheckBoxUnscaledHiDPIOutput->isChecked();
     256#endif /* Q_WS_MAC */
    248257    displayData.m_fShowMiniToolBar = m_pCheckBoxShowMiniToolBar->isChecked();
    249258    displayData.m_fMiniToolBarAtTop = m_pComboToolBarAlignment->isChecked();
     
    335344        {
    336345            gEDataManager->setScaleFactor(displayData.m_dScaleFactor, m_machine.GetId());
     346#ifdef Q_WS_MAC
     347            gEDataManager->setUseUnscaledHiDPIOutput(displayData.m_fUseUnscaledHiDPIOutput, m_machine.GetId());
     348#endif /* Q_WS_MAC */
    337349            gEDataManager->setMiniToolbarEnabled(displayData.m_fShowMiniToolBar, m_machine.GetId());
    338350            gEDataManager->setMiniToolbarAlignment(displayData.m_fMiniToolBarAtTop ? Qt::AlignTop : Qt::AlignBottom, m_machine.GetId());
     
    503515    setTabOrder(m_pEditorVideoCaptureBitRate, m_pSliderGuestScreenScale);
    504516    setTabOrder(m_pSliderGuestScreenScale, m_pEditorGuestScreenScale);
    505     setTabOrder(m_pEditorGuestScreenScale, m_pCheckBoxShowMiniToolBar);
     517    setTabOrder(m_pEditorGuestScreenScale, m_pCheckBoxUnscaledHiDPIOutput);
     518    setTabOrder(m_pCheckBoxUnscaledHiDPIOutput, m_pCheckBoxShowMiniToolBar);
    506519    setTabOrder(m_pCheckBoxShowMiniToolBar, m_pComboToolBarAlignment);
    507520}
     
    560573
    561574    /* Machine-window tab: */
     575    m_pMenuBarEditor->setEnabled(isMachineInValidMode());
     576    m_pLabelGuestScreenScale->setEnabled(isMachineInValidMode());
     577    m_pSliderGuestScreenScale->setEnabled(isMachineInValidMode());
     578    m_pLabelGuestScreenScaleMin->setEnabled(isMachineInValidMode());
     579    m_pLabelGuestScreenScaleMax->setEnabled(isMachineInValidMode());
     580    m_pEditorGuestScreenScale->setEnabled(isMachineInValidMode());
     581#ifdef Q_WS_MAC
     582    m_pLabelHiDPI->setEnabled(isMachineInValidMode());
     583    m_pCheckBoxUnscaledHiDPIOutput->setEnabled(isMachineInValidMode());
     584#else /* !Q_WS_MAC */
     585    m_pLabelHiDPI->hide();
     586    m_pCheckBoxUnscaledHiDPIOutput->hide();
     587#endif /* !Q_WS_MAC */
    562588    m_pLabelMiniToolBar->setEnabled(isMachineInValidMode());
    563589    m_pCheckBoxShowMiniToolBar->setEnabled(isMachineInValidMode());
    564590    m_pComboToolBarAlignment->setEnabled(isMachineInValidMode() && m_pCheckBoxShowMiniToolBar->isChecked());
     591    m_pStatusBarEditor->setEnabled(isMachineInValidMode());
    565592}
    566593
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.h

    r53401 r53465  
    5353        , m_iVideoCaptureBitRate(0)
    5454        , m_dScaleFactor(1)
     55#ifdef Q_WS_MAC
     56        , m_fUseUnscaledHiDPIOutput(false)
     57#endif /* Q_WS_MAC */
    5558        , m_fShowMiniToolBar(false)
    5659        , m_fMiniToolBarAtTop(false)
     
    8083               (m_screens == other.m_screens) &&
    8184               (m_dScaleFactor == other.m_dScaleFactor) &&
     85#ifdef Q_WS_MAC
     86               (m_fUseUnscaledHiDPIOutput == other.m_fUseUnscaledHiDPIOutput) &&
     87#endif /* Q_WS_MAC */
    8288               (m_fShowMiniToolBar == other.m_fShowMiniToolBar) &&
    8389               (m_fMiniToolBarAtTop == other.m_fMiniToolBarAtTop);
     
    116122    /* Variables: Machine Window stuff: */
    117123    double m_dScaleFactor;
     124#ifdef Q_WS_MAC
     125    bool m_fUseUnscaledHiDPIOutput;
     126#endif /* Q_WS_MAC */
    118127    bool m_fShowMiniToolBar;
    119128    bool m_fMiniToolBarAtTop;
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.ui

    r53402 r53465  
    722722       </item>
    723723       <item row="3" column="0">
     724        <widget class="QLabel" name="m_pLabelHiDPI">
     725         <property name="text">
     726          <string>HiDPI:</string>
     727         </property>
     728         <property name="alignment">
     729          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
     730         </property>
     731        </widget>
     732       </item>
     733       <item row="3" column="1" colspan="2">
     734        <widget class="QCheckBox" name="m_pCheckBoxUnscaledHiDPIOutput">
     735         <property name="sizePolicy">
     736          <sizepolicy vsizetype="Fixed" hsizetype="MinimumExpanding">
     737           <horstretch>0</horstretch>
     738           <verstretch>0</verstretch>
     739          </sizepolicy>
     740         </property>
     741         <property name="whatsThis">
     742          <string>If checked, guest screen content will not be logically scaled on hosts with HiDPI screens.</string>
     743         </property>
     744         <property name="text">
     745          <string>Use &amp;Unscaled HiDPI Output</string>
     746         </property>
     747        </widget>
     748       </item>
     749       <item row="4" column="0">
    724750        <widget class="QLabel" name="m_pLabelMiniToolBar">
    725751         <property name="text">
     
    731757        </widget>
    732758       </item>
    733        <item row="3" column="1" colspan="2">
     759       <item row="4" column="1" colspan="2">
    734760        <widget class="QCheckBox" name="m_pCheckBoxShowMiniToolBar">
    735761         <property name="sizePolicy">
     
    750776        </widget>
    751777       </item>
    752        <item row="4" column="1" colspan="2">
     778       <item row="5" column="1" colspan="2">
    753779        <widget class="QCheckBox" name="m_pComboToolBarAlignment">
    754780         <property name="sizePolicy">
     
    769795        </widget>
    770796       </item>
    771        <item row="5" column="0" colspan="3">
     797       <item row="6" column="0" colspan="3">
    772798        <spacer name="m_pSpacer">
    773799         <property name="orientation">
     
    782808        </spacer>
    783809       </item>
    784        <item row="6" column="0" colspan="3">
     810       <item row="7" column="0" colspan="3">
    785811        <widget class="UIStatusBarEditorWidget" name="m_pStatusBarEditor">
    786812         <property name="whatsThis">
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