Reduced the size of the status icon on the avatar image in FriendList.

This commit is contained in:
thunder2 2015-08-11 13:40:02 +02:00
parent 442ec2337f
commit e73e68d860

View File

@ -456,15 +456,18 @@ void FriendList::groupsChanged()
static QIcon createAvatar(const QPixmap &avatar, const QPixmap &overlay) static QIcon createAvatar(const QPixmap &avatar, const QPixmap &overlay)
{ {
int avatarWidth = avatar.width();
int avatarHeight = avatar.height();
QPixmap pixmap(avatar); QPixmap pixmap(avatar);
int x = avatar.width() / 2; int overlayWidth = avatarWidth / 2.5;
int y = avatar.height() / 2; int overlayHeight = avatarHeight / 2.5;
int w = avatar.width() / 2; int overlayX = avatarWidth - overlayWidth;
int h = avatar.height() / 2; int overlayY = avatarHeight - overlayHeight;
QPainter painter(&pixmap); QPainter painter(&pixmap);
painter.drawPixmap(x, y, w, h, overlay); painter.drawPixmap(overlayX, overlayY, overlayWidth, overlayHeight, overlay);
QIcon icon; QIcon icon;
icon.addPixmap(pixmap); icon.addPixmap(pixmap);