mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-24 19:14:40 +00:00
fix formatting
This commit is contained in:
parent
327144c874
commit
6b5f472bf0
@ -7,8 +7,8 @@ path = [
|
|||||||
"CMakeSettings.json",
|
"CMakeSettings.json",
|
||||||
".github/FUNDING.yml",
|
".github/FUNDING.yml",
|
||||||
".github/shadps4.png",
|
".github/shadps4.png",
|
||||||
".github/workflows/scripts/update_translation.sh",
|
".github/workflows/scripts/update_translation.sh",
|
||||||
".github/workflows/update_translation.yml",
|
".github/workflows/update_translation.yml",
|
||||||
".gitmodules",
|
".gitmodules",
|
||||||
"dist/MacOSBundleInfo.plist.in",
|
"dist/MacOSBundleInfo.plist.in",
|
||||||
"dist/net.shadps4.shadPS4.desktop",
|
"dist/net.shadps4.shadPS4.desktop",
|
||||||
@ -72,7 +72,7 @@ path = [
|
|||||||
"src/images/youtube.svg",
|
"src/images/youtube.svg",
|
||||||
"src/shadps4.qrc",
|
"src/shadps4.qrc",
|
||||||
"src/shadps4.rc",
|
"src/shadps4.rc",
|
||||||
"src/qt_gui/translations/update_translation.sh",
|
"src/qt_gui/translations/update_translation.sh",
|
||||||
]
|
]
|
||||||
precedence = "aggregate"
|
precedence = "aggregate"
|
||||||
SPDX-FileCopyrightText = "shadPS4 Emulator Project"
|
SPDX-FileCopyrightText = "shadPS4 Emulator Project"
|
||||||
|
@ -34,7 +34,8 @@ GameGridFrame::GameGridFrame(std::shared_ptr<gui_settings> gui_settings,
|
|||||||
connect(this->horizontalScrollBar(), &QScrollBar::valueChanged, this,
|
connect(this->horizontalScrollBar(), &QScrollBar::valueChanged, this,
|
||||||
&GameGridFrame::RefreshGridBackgroundImage);
|
&GameGridFrame::RefreshGridBackgroundImage);
|
||||||
connect(this, &QTableWidget::customContextMenuRequested, this, [=, this](const QPoint& pos) {
|
connect(this, &QTableWidget::customContextMenuRequested, this, [=, this](const QPoint& pos) {
|
||||||
m_gui_context_menus.RequestGameMenu(pos, m_game_info->m_games, m_compat_info, m_gui_settings, this, false);
|
m_gui_context_menus.RequestGameMenu(pos, m_game_info->m_games, m_compat_info,
|
||||||
|
m_gui_settings, this, false);
|
||||||
PopulateGameGrid(m_game_info->m_games, false);
|
PopulateGameGrid(m_game_info->m_games, false);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -241,9 +242,9 @@ void GameGridFrame::SetFavoriteIcon(QWidget* parentWidget, QVector<GameInfo> m_g
|
|||||||
bool isFavorite = m_gui_settings->GetValue(gui::favorites, serialStr, false).toBool();
|
bool isFavorite = m_gui_settings->GetValue(gui::favorites, serialStr, false).toBool();
|
||||||
|
|
||||||
QLabel* label = new QLabel(parentWidget);
|
QLabel* label = new QLabel(parentWidget);
|
||||||
label->setPixmap(
|
label->setPixmap(QPixmap(":images/favorite_icon.png")
|
||||||
QPixmap(":images/favorite_icon.png")
|
.scaled(icon_size / 3.8, icon_size / 3.8, Qt::KeepAspectRatio,
|
||||||
.scaled(icon_size / 3.8, icon_size / 3.8, Qt::KeepAspectRatio, Qt::SmoothTransformation));
|
Qt::SmoothTransformation));
|
||||||
label->move(icon_size - icon_size / 4, 2);
|
label->move(icon_size - icon_size / 4, 2);
|
||||||
label->raise();
|
label->raise();
|
||||||
label->setVisible(isFavorite);
|
label->setVisible(isFavorite);
|
||||||
|
@ -54,7 +54,7 @@ GameListFrame::GameListFrame(std::shared_ptr<gui_settings> gui_settings,
|
|||||||
this->horizontalHeader()->setSectionResizeMode(10, QHeaderView::Fixed);
|
this->horizontalHeader()->setSectionResizeMode(10, QHeaderView::Fixed);
|
||||||
PopulateGameList();
|
PopulateGameList();
|
||||||
|
|
||||||
connect(this, &QTableWidget::cellClicked, this, [=, this](int row, int column) {
|
connect(this, &QTableWidget::cellClicked, this, [=, this](int row, int column) {
|
||||||
ToggleFavorite(row, column);
|
ToggleFavorite(row, column);
|
||||||
PopulateGameList(false);
|
PopulateGameList(false);
|
||||||
});
|
});
|
||||||
@ -84,7 +84,8 @@ GameListFrame::GameListFrame(std::shared_ptr<gui_settings> gui_settings,
|
|||||||
});
|
});
|
||||||
|
|
||||||
connect(this, &QTableWidget::customContextMenuRequested, this, [=, this](const QPoint& pos) {
|
connect(this, &QTableWidget::customContextMenuRequested, this, [=, this](const QPoint& pos) {
|
||||||
m_gui_context_menus.RequestGameMenu(pos, m_game_info->m_games, m_compat_info, m_gui_settings, this, true);
|
m_gui_context_menus.RequestGameMenu(pos, m_game_info->m_games, m_compat_info,
|
||||||
|
m_gui_settings, this, true);
|
||||||
PopulateGameList(false);
|
PopulateGameList(false);
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -126,7 +127,7 @@ void GameListFrame::PopulateGameList(bool isInitialPopulation) {
|
|||||||
|
|
||||||
this->setRowCount(m_game_info->m_games.size());
|
this->setRowCount(m_game_info->m_games.size());
|
||||||
ResizeIcons(icon_size);
|
ResizeIcons(icon_size);
|
||||||
|
|
||||||
ApplyLastSorting(isInitialPopulation);
|
ApplyLastSorting(isInitialPopulation);
|
||||||
|
|
||||||
for (int i = 0; i < m_game_info->m_games.size(); i++) {
|
for (int i = 0; i < m_game_info->m_games.size(); i++) {
|
||||||
|
@ -33,8 +33,8 @@ class GuiContextMenus : public QObject {
|
|||||||
public:
|
public:
|
||||||
void RequestGameMenu(const QPoint& pos, QVector<GameInfo>& m_games,
|
void RequestGameMenu(const QPoint& pos, QVector<GameInfo>& m_games,
|
||||||
std::shared_ptr<CompatibilityInfoClass> m_compat_info,
|
std::shared_ptr<CompatibilityInfoClass> m_compat_info,
|
||||||
std::shared_ptr<gui_settings> settings,
|
std::shared_ptr<gui_settings> settings, QTableWidget* widget,
|
||||||
QTableWidget* widget, bool isList) {
|
bool isList) {
|
||||||
QPoint global_pos = widget->viewport()->mapToGlobal(pos);
|
QPoint global_pos = widget->viewport()->mapToGlobal(pos);
|
||||||
std::shared_ptr<gui_settings> m_gui_settings = std::move(settings);
|
std::shared_ptr<gui_settings> m_gui_settings = std::move(settings);
|
||||||
int itemID = 0;
|
int itemID = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user