VirtualBox

Changeset 69711 in vbox for trunk


Ignore:
Timestamp:
Nov 16, 2017 11:29:11 AM (7 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:8694: HiDPI support fix for VBoxAboutDlg: Make sure about pixmap is manually upscaled if necessary (s.a. r119035).

File:
1 edited

Legend:

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

    r69667 r69711  
    132132    m_pixmap = icon.pixmap(m_size);
    133133
     134    // WORKAROUND:
     135    // Since we don't have x3 and x4 HiDPI icons yet,
     136    // and we hadn't enabled automatic up-scaling for now,
     137    // we have to make sure m_pixmap is upscaled to required size.
     138    const QSize actualSize = m_pixmap.size() / m_pixmap.devicePixelRatio();
     139    if (   actualSize.width() < m_size.width()
     140        || actualSize.height() < m_size.height())
     141        m_pixmap = m_pixmap.scaled(m_size, Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
     142
    134143    /* Prepare main-layout: */
    135144    prepareMainLayout();
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