mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-05-30 23:33:17 +00:00
Revert use of embedded icons (#2509)
Co-authored-by: rainmakerv2 <30595646+jpau02@users.noreply.github.com>
This commit is contained in:
parent
10486db091
commit
e1e697a3ff
3 changed files with 15 additions and 61 deletions
|
@ -118,20 +118,18 @@ void TrophyViewer::PopulateTrophyWidget(QString title) {
|
|||
item->setData(Qt::DecorationRole, icon);
|
||||
item->setFlags(item->flags() & ~Qt::ItemIsEditable);
|
||||
tableWidget->setItem(row, 1, item);
|
||||
|
||||
const std::string filename = GetTrpType(trpType[row].at(0));
|
||||
QTableWidgetItem* typeitem = new QTableWidgetItem();
|
||||
|
||||
auto resource = cmrc::res::get_filesystem();
|
||||
std::string resourceString = "Resources/" + filename;
|
||||
auto trophytypefile = resource.open(resourceString);
|
||||
|
||||
QImage type_icon =
|
||||
QImage(QString::fromStdString(resourceString))
|
||||
.scaled(QSize(64, 64), Qt::KeepAspectRatio, Qt::SmoothTransformation);
|
||||
typeitem->setData(Qt::DecorationRole, type_icon);
|
||||
typeitem->setFlags(typeitem->flags() & ~Qt::ItemIsEditable);
|
||||
tableWidget->setItem(row, 6, typeitem);
|
||||
QString type;
|
||||
if (trpType[row] == "P") {
|
||||
type = "Platinum";
|
||||
} else if (trpType[row] == "G") {
|
||||
type = "Gold";
|
||||
} else if (trpType[row] == "S") {
|
||||
type = "Silver";
|
||||
} else if (trpType[row] == "B") {
|
||||
type = "Bronze";
|
||||
}
|
||||
|
||||
std::string detailString = trophyDetails[row].toStdString();
|
||||
std::size_t newline_pos = 0;
|
||||
|
@ -146,6 +144,7 @@ void TrophyViewer::PopulateTrophyWidget(QString title) {
|
|||
SetTableItem(tableWidget, row, 3, QString::fromStdString(detailString));
|
||||
SetTableItem(tableWidget, row, 4, trpId[row]);
|
||||
SetTableItem(tableWidget, row, 5, trpHidden[row]);
|
||||
SetTableItem(tableWidget, row, 6, type);
|
||||
SetTableItem(tableWidget, row, 7, trpPid[row]);
|
||||
}
|
||||
tableWidget->verticalHeader()->resizeSection(row, icon.height());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue