Commit da05675b authored by Kirill Tatunov's avatar Kirill Tatunov Committed by David Edmundson

Enable anti-aliasing for user avatars

Summary: By default, QT uses fast transformations when scaling pixmaps but it results in a very pixelated image. This patch fixes it for avatars in the user manager module.

Test Plan:
Resolution of the original avatar image is 256x256.
Before: {F5819211}
After: {F5819213}

Reviewers: #plasma, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: abetts, davidedmundson, ngraham, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D12468
parent fcc89380
......@@ -149,7 +149,7 @@ QVariant AccountModel::data(const QModelIndex& index, int role) const
if (!file.exists()) {
return QIcon::fromTheme("user-identity").pixmap(size, size);
}
return QPixmap(file.fileName()).scaled(size, size);
return QPixmap(file.fileName()).scaled(size, size, Qt::KeepAspectRatio, Qt::SmoothTransformation);
}
case AccountModel::RealName:
return acc->realName();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment