mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-24 14:23:36 -05:00
Reduced the size of the status icon on the avatar image in FriendList.
This commit is contained in:
parent
442ec2337f
commit
e73e68d860
@ -456,15 +456,18 @@ void FriendList::groupsChanged()
|
||||
|
||||
static QIcon createAvatar(const QPixmap &avatar, const QPixmap &overlay)
|
||||
{
|
||||
int avatarWidth = avatar.width();
|
||||
int avatarHeight = avatar.height();
|
||||
|
||||
QPixmap pixmap(avatar);
|
||||
|
||||
int x = avatar.width() / 2;
|
||||
int y = avatar.height() / 2;
|
||||
int w = avatar.width() / 2;
|
||||
int h = avatar.height() / 2;
|
||||
int overlayWidth = avatarWidth / 2.5;
|
||||
int overlayHeight = avatarHeight / 2.5;
|
||||
int overlayX = avatarWidth - overlayWidth;
|
||||
int overlayY = avatarHeight - overlayHeight;
|
||||
|
||||
QPainter painter(&pixmap);
|
||||
painter.drawPixmap(x, y, w, h, overlay);
|
||||
painter.drawPixmap(overlayX, overlayY, overlayWidth, overlayHeight, overlay);
|
||||
|
||||
QIcon icon;
|
||||
icon.addPixmap(pixmap);
|
||||
|
Loading…
Reference in New Issue
Block a user