VirtualBox

Changeset 55879 in vbox


Ignore:
Timestamp:
May 15, 2015 5:29:06 PM (10 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
100336
Message:

FE/Qt: 6278: Selector UI: Details pane: HiDPI icons.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsElement.cpp

    r54228 r55879  
    229229{
    230230    /* Cache icon: */
    231     m_pixmapSize = icon.isNull() ? QSize(0, 0) : icon.availableSizes().first();
    232     m_pixmap = icon.pixmap(m_pixmapSize);
     231    if (icon.isNull())
     232    {
     233        /* No icon provided: */
     234        m_pixmapSize = QSize();
     235        m_pixmap = QPixmap();
     236    }
     237    else
     238    {
     239        /* Determine default the icon size: */
     240        const QStyle *pStyle = QApplication::style();
     241        const int iIconMetric = pStyle->pixelMetric(QStyle::PM_SmallIconSize);
     242        m_pixmapSize = QSize(iIconMetric, iIconMetric);
     243        /* Acquire the icon of the corresponding size: */
     244        m_pixmap = icon.pixmap(m_pixmapSize);
     245    }
    233246
    234247    /* Update linked values: */
Note: See TracChangeset for help on using the changeset viewer.

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