summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2018-10-27 01:46:38 +0200
committerLioncash <mathew1800@gmail.com>2018-10-27 07:05:56 +0200
commit9024cbb5b8462df113526f5027b88723f4765fdf (patch)
treee38ecd4d7bab1502992cdaf0d227467439bdf19b
parentconfigure_system: Move entry formatting for the user account list entries to its own function (diff)
downloadyuzu-9024cbb5b8462df113526f5027b88723f4765fdf.tar
yuzu-9024cbb5b8462df113526f5027b88723f4765fdf.tar.gz
yuzu-9024cbb5b8462df113526f5027b88723f4765fdf.tar.bz2
yuzu-9024cbb5b8462df113526f5027b88723f4765fdf.tar.lz
yuzu-9024cbb5b8462df113526f5027b88723f4765fdf.tar.xz
yuzu-9024cbb5b8462df113526f5027b88723f4765fdf.tar.zst
yuzu-9024cbb5b8462df113526f5027b88723f4765fdf.zip
-rw-r--r--src/yuzu/configuration/configure_system.cpp21
1 files changed, 7 insertions, 14 deletions
diff --git a/src/yuzu/configuration/configure_system.cpp b/src/yuzu/configuration/configure_system.cpp
index f4e892a21..4b34c1e28 100644
--- a/src/yuzu/configuration/configure_system.cpp
+++ b/src/yuzu/configuration/configure_system.cpp
@@ -81,7 +81,7 @@ QPixmap GetIcon(Service::Account::UUID uuid) {
icon.loadFromData(backup_jpeg.data(), backup_jpeg.size());
}
- return icon;
+ return icon.scaled(64, 64, Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
}
} // Anonymous namespace
@@ -162,8 +162,7 @@ void ConfigureSystem::PopulateUserList() {
reinterpret_cast<const char*>(profile.username.data()), profile.username.size());
list_items.push_back(QList<QStandardItem*>{new QStandardItem{
- GetIcon(user).scaled(64, 64, Qt::IgnoreAspectRatio, Qt::SmoothTransformation),
- FormatUserEntryText(QString::fromStdString(username), user)}});
+ GetIcon(user), FormatUserEntryText(QString::fromStdString(username), user)}});
}
for (const auto& item : list_items)
@@ -256,9 +255,7 @@ void ConfigureSystem::AddUser() {
profile_manager->CreateNewUser(uuid, username.toStdString());
- item_model->appendRow(new QStandardItem{
- GetIcon(uuid).scaled(64, 64, Qt::IgnoreAspectRatio, Qt::SmoothTransformation),
- FormatUserEntryText(username, uuid)});
+ item_model->appendRow(new QStandardItem{GetIcon(uuid), FormatUserEntryText(username, uuid)});
}
void ConfigureSystem::RenameUser() {
@@ -292,9 +289,8 @@ void ConfigureSystem::RenameUser() {
item_model->setItem(
user, 0,
- new QStandardItem{
- GetIcon(*uuid).scaled(64, 64, Qt::IgnoreAspectRatio, Qt::SmoothTransformation),
- FormatUserEntryText(QString::fromStdString(username_std), *uuid)});
+ new QStandardItem{GetIcon(*uuid),
+ FormatUserEntryText(QString::fromStdString(username_std), *uuid)});
UpdateCurrentUser();
}
@@ -369,10 +365,7 @@ void ConfigureSystem::SetUserImage() {
}
const auto username = GetAccountUsername(*profile_manager, *uuid);
- item_model->setItem(
- index, 0,
- new QStandardItem{
- GetIcon(*uuid).scaled(64, 64, Qt::IgnoreAspectRatio, Qt::SmoothTransformation),
- FormatUserEntryText(username, *uuid)});
+ item_model->setItem(index, 0,
+ new QStandardItem{GetIcon(*uuid), FormatUserEntryText(username, *uuid)});
UpdateCurrentUser();
}