Merge pull request #691 from Xphalnos/main

Qt: Update Game List
This commit is contained in:
georgemoralis 2024-09-01 17:12:11 +03:00 committed by GitHub
commit 5e089ada08
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 10 additions and 19 deletions

View File

@ -41,7 +41,6 @@ public:
: fw.left(3).insert(1, '.');
game.fw = (fw_int == 0) ? "0.00" : fw_.toStdString();
game.version = psf.GetString("APP_VER");
game.category = psf.GetString("CATEGORY");
}
return game;
}

View File

@ -23,14 +23,13 @@ GameListFrame::GameListFrame(std::shared_ptr<GameInfoClass> game_info_get, QWidg
this->horizontalHeader()->setSortIndicatorShown(true);
this->horizontalHeader()->setStretchLastSection(true);
this->setContextMenuPolicy(Qt::CustomContextMenu);
this->setColumnCount(9);
this->setColumnWidth(1, 250);
this->setColumnWidth(2, 110);
this->setColumnWidth(3, 80);
this->setColumnWidth(4, 90);
this->setColumnWidth(5, 80);
this->setColumnWidth(6, 80);
this->setColumnWidth(7, 80);
this->setColumnCount(8);
this->setColumnWidth(1, 300); // Name
this->setColumnWidth(2, 120); // Serial
this->setColumnWidth(3, 90); // Region
this->setColumnWidth(4, 90); // Firmware
this->setColumnWidth(5, 90); // Size
this->setColumnWidth(6, 90); // Version
QStringList headers;
headers << "Icon"
<< "Name"
@ -39,7 +38,6 @@ GameListFrame::GameListFrame(std::shared_ptr<GameInfoClass> game_info_get, QWidg
<< "Firmware"
<< "Size"
<< "Version"
<< "Category"
<< "Path";
this->setHorizontalHeaderLabels(headers);
this->horizontalHeader()->setSortIndicatorShown(true);
@ -87,8 +85,7 @@ void GameListFrame::PopulateGameList() {
SetTableItem(i, 4, QString::fromStdString(m_game_info->m_games[i].fw));
SetTableItem(i, 5, QString::fromStdString(m_game_info->m_games[i].size));
SetTableItem(i, 6, QString::fromStdString(m_game_info->m_games[i].version));
SetTableItem(i, 7, QString::fromStdString(m_game_info->m_games[i].category));
SetTableItem(i, 8, QString::fromStdString(m_game_info->m_games[i].path));
SetTableItem(i, 7, QString::fromStdString(m_game_info->m_games[i].path));
}
}
@ -168,7 +165,7 @@ void GameListFrame::SetTableItem(int row, int column, QString itemStr) {
QVBoxLayout* layout = new QVBoxLayout(widget);
QLabel* label = new QLabel(itemStr, widget);
label->setStyleSheet("color: white; font-size: 15px; font-weight: bold;");
label->setStyleSheet("color: white; font-size: 16px; font-weight: bold;");
// Create shadow effect
QGraphicsDropShadowEffect* shadowEffect = new QGraphicsDropShadowEffect();

View File

@ -14,7 +14,6 @@ struct GameInfo {
std::string serial = "Unknown";
std::string version = "Unknown";
std::string region = "Unknown";
std::string category = "Unknown";
std::string fw = "Unknown";
};

View File

@ -7,8 +7,6 @@
#include <QPushButton>
#include <QToolBar>
QT_BEGIN_NAMESPACE
class Ui_MainWindow {
public:
QAction* bootInstallPkgAct;
@ -355,5 +353,3 @@ public:
namespace Ui {
class MainWindow : public Ui_MainWindow {};
} // namespace Ui
QT_END_NAMESPACE