VirtualBox

Ignore:
Timestamp:
May 19, 2015 11:10:48 AM (10 years ago)
Author:
vboxsync
Message:

FE/Qt: 6278: Machine Settings dialog: Enable use of the HiDPI icons.

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

Legend:

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

    r52733 r55930  
    6161    Ui::UIMachineSettingsNetwork::setupUi(this);
    6262
     63    /* Determine icon metric: */
     64    const QStyle *pStyle = QApplication::style();
     65    const int iIconMetric = pStyle->pixelMetric(QStyle::PM_SmallIconSize) * .625;
     66
    6367    /* Setup widgets: */
    6468    m_pAdapterNameCombo->setInsertPolicy(QComboBox::NoInsert);
     
    6670    m_pMACEditor->setMinimumWidthByText(QString().fill('0', 12));
    6771    m_pMACButton->setIcon(UIIconPool::iconSet(":/refresh_16px.png"));
    68     m_pAdvancedArrow->setIconSize(QSize(10, 10));
     72    m_pAdvancedArrow->setIconSize(QSize(iIconMetric, iIconMetric));
    6973    m_pAdvancedArrow->setIconForButtonState(QIArrowButtonSwitch::ButtonState_Collapsed,
    7074                                            UIIconPool::iconSet(":/arrow_right_10px.png"));
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSF.cpp

    r55258 r55930  
    192192                                            ":/sf_remove_disabled_16px.png"));
    193193
     194    /* Determine icon metric: */
     195    const QStyle *pStyle = QApplication::style();
     196    const int iIconMetric = pStyle->pixelMetric(QStyle::PM_SmallIconSize);
     197
    194198    /* Prepare tool-bar: */
    195     m_pFoldersToolBar->setIconSize(QSize(16, 16));
     199    m_pFoldersToolBar->setIconSize(QSize(iIconMetric, iIconMetric));
    196200    m_pFoldersToolBar->setOrientation(Qt::Vertical);
    197201    m_pFoldersToolBar->addAction(mNewAction);
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsStorage.cpp

    r55827 r55930  
    123123                    nullPixmap);
    124124
     125    /* Determine icon metric: */
     126    const QStyle *pStyle = QApplication::style();
     127    const int iIconMetric = pStyle->pixelMetric(QStyle::PM_SmallIconSize);
     128
    125129    /* Return pixmap of first available size: */
    126     return icon.pixmap(availableSizes.first());
     130    return icon.pixmap(QSize(iIconMetric, iIconMetric));
    127131}
    128132
     
    14191423        case R_IconSize:
    14201424        {
    1421             return 16;
     1425            return QApplication::style()->pixelMetric(QStyle::PM_SmallIconSize);
    14221426        }
    14231427
     
    20252029    mTwStorageTree->setCurrentIndex (mStorageModel->root());
    20262030
     2031    /* Determine icon metric: */
     2032    const QStyle *pStyle = QApplication::style();
     2033    const int iIconMetric = pStyle->pixelMetric(QStyle::PM_SmallIconSize);
     2034
    20272035    /* Storage ToolBar */
    2028     mTbStorageBar->setIconSize (QSize (16, 16));
     2036    mTbStorageBar->setIconSize (QSize (iIconMetric, iIconMetric));
    20292037    mTbStorageBar->addAction (mAddAttAction);
    20302038    mTbStorageBar->addAction (mDelAttAction);
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsUSB.cpp

    r55330 r55930  
    187187                                            ":/usb_movedown_disabled_16px.png"));
    188188
     189    /* Determine icon metric: */
     190    const QStyle *pStyle = QApplication::style();
     191    const int iIconMetric = pStyle->pixelMetric(QStyle::PM_SmallIconSize);
     192
    189193    /* Prepare tool-bar: */
    190     m_pFiltersToolBar->setIconSize(QSize(16, 16));
     194    m_pFiltersToolBar->setIconSize(QSize(iIconMetric, iIconMetric));
    191195    m_pFiltersToolBar->setOrientation(Qt::Vertical);
    192196    m_pFiltersToolBar->addAction(mNewAction);
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIPortForwardingTable.cpp

    r53328 r55930  
    595595        m_pToolBar = new UIToolBar;
    596596        {
     597            /* Determine icon metric: */
     598            const QStyle *pStyle = QApplication::style();
     599            const int iIconMetric = pStyle->pixelMetric(QStyle::PM_SmallIconSize);
    597600            /* Configure toolbar: */
    598             m_pToolBar->setIconSize(QSize(16, 16));
     601            m_pToolBar->setIconSize(QSize(iIconMetric, iIconMetric));
    599602            m_pToolBar->setOrientation(Qt::Vertical);
    600603            /* Create 'add' action: */
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