VirtualBox

Ignore:
Timestamp:
Nov 10, 2017 2:40:06 PM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
119009
Message:

FE/Qt: bugref:8694: Selector UI: HiDPI fix for large desktop pane penguin icons.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/UIDesktopPane.cpp

    r69039 r69645  
    547547
    548548    /* Assign corresponding icon: */
    549     m_pLabelToolsPaneIcon->setPixmap(icon.pixmap(QSize(200, 200)));
     549    const QList<QSize> aSizes = icon.availableSizes();
     550    const QSize firstOne = aSizes.isEmpty() ? QSize(200, 200) : aSizes.first();
     551    const double dRatio = QApplication::style()->pixelMetric(QStyle::PM_LargeIconSize) / 32;
     552    m_pLabelToolsPaneIcon->setPixmap(icon.pixmap(QSize(firstOne.width() * dRatio, firstOne.height() * dRatio)));
    550553
    551554    /* Raise corresponding widget: */
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