VirtualBox

Changeset 35668 in vbox


Ignore:
Timestamp:
Jan 21, 2011 2:15:04 PM (14 years ago)
Author:
vboxsync
Message:

FE/Qt4: allow transparency on Win7 for the drag pixmap

File:
1 edited

Legend:

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

    r34213 r35668  
    594594    p.setFont(font());
    595595    p.drawText(QRect(margin, margin + osTypeSize.height() + space,  s.width() - 2 * margin, nameSize.height()), Qt::AlignCenter, name);
    596 #ifdef Q_WS_MAC
    597     p.setCompositionMode(QPainter::CompositionMode_DestinationIn);
    598     p.fillRect(image.rect(), QColor(0, 0, 0, 177));
    599 #endif /* Q_WS_MAC */
     596        /* Transparent icons are not supported on all platforms. */
     597#if defined(Q_WS_MAC) || defined(Q_WS_WIN)
     598# ifdef Q_WS_WIN
     599    /* Todo: check Win XP, Vista, 2003 */
     600    if (QSysInfo::windowsVersion() == QSysInfo::WV_WINDOWS7)
     601# endif /* Q_WS_WIN */
     602        {
     603            p.setCompositionMode(QPainter::CompositionMode_DestinationIn);
     604                p.fillRect(image.rect(), QColor(0, 0, 0, 177));
     605        }
     606#endif /* defined(Q_WS_MAC) || defined(Q_WS_WIN) */
    600607    p.end();
    601608    /* Some Qt versions seems buggy in creating QPixmap from QImage. Seems they
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