mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-26 23:36:59 -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)
|
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);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user