compatibility_data: Added compatibility related settings to GUI (#1855)

* compatibility_data: added compatibility related settings to gui
* New game compatibility section in settings dialog
* Context menu now has a compatibility section
* Adjusted minimum size of updater section to 265

* update translations

* revert to deprecated statechanged

* fix display compatibility data option
This commit is contained in:
f8ith 2024-12-25 15:30:09 +08:00 committed by GitHub
parent a89c29c2ca
commit d55e41a19e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 256 additions and 37 deletions

View file

@ -3,9 +3,12 @@
#include "common/path_util.h"
#include "game_grid_frame.h"
#include "qt_gui/compatibility_info.h"
GameGridFrame::GameGridFrame(std::shared_ptr<GameInfoClass> game_info_get, QWidget* parent)
: QTableWidget(parent), m_game_info(game_info_get) {
GameGridFrame::GameGridFrame(std::shared_ptr<GameInfoClass> game_info_get,
std::shared_ptr<CompatibilityInfoClass> compat_info_get,
QWidget* parent)
: QTableWidget(parent), m_game_info(game_info_get), m_compat_info(compat_info_get) {
icon_size = Config::getIconSizeGrid();
windowWidth = parent->width();
this->setShowGrid(false);
@ -29,7 +32,7 @@ GameGridFrame::GameGridFrame(std::shared_ptr<GameInfoClass> game_info_get, QWidg
connect(this->horizontalScrollBar(), &QScrollBar::valueChanged, this,
&GameGridFrame::RefreshGridBackgroundImage);
connect(this, &QTableWidget::customContextMenuRequested, this, [=, this](const QPoint& pos) {
m_gui_context_menus.RequestGameMenu(pos, m_game_info->m_games, this, false);
m_gui_context_menus.RequestGameMenu(pos, m_game_info->m_games, m_compat_info, this, false);
});
}