VirtualBox

Changeset 34196 in vbox for trunk


Ignore:
Timestamp:
Nov 19, 2010 1:17:33 PM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
67936
Message:

FE/Qt4: try to fix distortion of drag images on Linux

File:
1 edited

Legend:

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

    r34108 r34196  
    584584            2 * margin + osTypeSize.height() + space + nameSize.height());
    585585    QImage image(s, QImage::Format_ARGB32);
    586     image.fill(Qt::transparent);
     586    image.fill(QColor(Qt::transparent).rgba());
    587587    QPainter p(&image);
    588588    p.setRenderHint(QPainter::Antialiasing);
    589589    p.setPen(QPen(Qt::white, 2));
    590     p.setBrush(QColor(qRgb(80, 80, 80)));
     590    p.setBrush(QColor(80, 80, 80));
    591591    p.drawRoundedRect(3, 3, s.width() - 3 * 2, s.height() - 3 * 2, 6, 6);
    592592    p.drawPixmap((s.width() - osTypeSize.width()) / 2, margin, osType);
     
    594594    p.setFont(font());
    595595    p.drawText(QRect(margin, margin + osTypeSize.height() + space,  s.width() - 2 * margin, nameSize.height()), Qt::AlignCenter, name);
    596     QImage p1(s, QImage::Format_ARGB32);
    597     p1.fill(qRgba(0, 0, 0, 177));
    598596    p.setCompositionMode(QPainter::CompositionMode_DestinationIn);
    599     p.drawImage(0, 0, p1);
    600     p.end();
     597    p.fillRect(image.rect(), QColor(0, 0, 0, 177));
    601598    return QPixmap::fromImage(image);
    602599}
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