VirtualBox

Ignore:
Timestamp:
May 26, 2014 5:28:21 PM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
93935
Message:

FE/Qt: 6278: Extend UIIconPool with HiDPI-aware method to load pixmap by pixmap-name.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/globals
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIIconPool.cpp

    r51267 r51406  
    2626/* Other VBox includes: */
    2727#include <iprt/assert.h>
     28
     29/* static */
     30QPixmap UIIconPool::pixmap(const QString &strName)
     31{
     32    /* Reuse iconSet API: */
     33    QIcon icon = iconSet(strName);
     34
     35    /* Return pixmap of first available size: */
     36    return icon.pixmap(icon.availableSizes().first());
     37}
    2838
    2939/* static */
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIIconPool.h

    r51267 r51406  
    4343        UIDefaultIconType_ArrowForward
    4444    };
     45
     46    /** Creates pixmap from passed pixmap @a strName. */
     47    static QPixmap pixmap(const QString &strName);
    4548
    4649    /** Creates icon from passed pixmap names for
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