QTfrontend/hats.cpp
changeset 3445 1ce844170014
parent 3236 4ab3917d7d44
child 4560 5d6c7f88db73
equal deleted inserted replaced
3444:9d501dc22f71 3445:1ce844170014
    46         tmppix.fill(QColor(Qt::transparent));
    46         tmppix.fill(QColor(Qt::transparent));
    47 
    47 
    48         QPainter painter(&tmppix);
    48         QPainter painter(&tmppix);
    49         painter.drawPixmap(QPoint(0, 5), hhpix);
    49         painter.drawPixmap(QPoint(0, 5), hhpix);
    50         painter.drawPixmap(QPoint(0, 0), pix.copy(0, 0, 32, 32));
    50         painter.drawPixmap(QPoint(0, 0), pix.copy(0, 0, 32, 32));
       
    51         if(pix.width() > 32)
       
    52             painter.drawPixmap(QPoint(0, 0), pix.copy(32, 0, 32, 32));
    51         painter.end();
    53         painter.end();
    52 
    54 
    53         hats.append(qMakePair(str, QIcon(tmppix)));
    55         hats.append(qMakePair(str, QIcon(tmppix)));
    54     }
    56     }
    55     // Reserved hats
    57     // Reserved hats