VirtualBox

Changeset 34208 in vbox for trunk/src


Ignore:
Timestamp:
Nov 19, 2010 3:43:55 PM (14 years ago)
Author:
vboxsync
Message:

FE/Qt4: make drag pixmap opaque on non Mac

File:
1 edited

Legend:

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

    r34202 r34208  
    589589    p.setPen(QPen(Qt::white, 2));
    590590    p.setBrush(QColor(80, 80, 80));
    591     p.drawRoundedRect(3, 3, s.width() - 3 * 2, s.height() - 3 * 2, 6, 6);
     591    p.drawRoundedRect(1, 1, s.width() - 1 * 2, s.height() - 1 * 2, 6, 6);
    592592    p.drawPixmap((s.width() - osTypeSize.width()) / 2, margin, osType);
    593593    p.setPen(Qt::white);
    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
    596597    p.setCompositionMode(QPainter::CompositionMode_DestinationIn);
    597598    p.fillRect(image.rect(), QColor(0, 0, 0, 177));
     599#endif /* Q_WS_MAC */
    598600    p.end();
     601    /* Some Qt versions seems buggy in creating QPixmap from QImage. Seems they
     602     * don't clear the background. */
    599603    QPixmap i1(s);
    600604    i1.fill(Qt::transparent);
     
    606610    i1.save("test_pixmap.png", "PNG");
    607611#endif
    608     return i1;//QPixmap::fromImage(image);
     612    return i1;
    609613}
    610614
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