mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-08-04 16:32:39 +00:00
QT: Various interface fixes
This commit is contained in:
parent
9424047214
commit
948516d0ca
@ -26,8 +26,10 @@
|
|||||||
#include <QTextEdit>
|
#include <QTextEdit>
|
||||||
#include <QVBoxLayout>
|
#include <QVBoxLayout>
|
||||||
#include <QXmlStreamReader>
|
#include <QXmlStreamReader>
|
||||||
#include <common/logging/log.h>
|
|
||||||
#include "cheats_patches.h"
|
#include "cheats_patches.h"
|
||||||
|
#include "common/config.h"
|
||||||
|
#include "common/logging/log.h"
|
||||||
#include "common/memory_patcher.h"
|
#include "common/memory_patcher.h"
|
||||||
#include "common/path_util.h"
|
#include "common/path_util.h"
|
||||||
#include "core/module.h"
|
#include "core/module.h"
|
||||||
@ -92,7 +94,7 @@ void CheatsPatches::setupUI() {
|
|||||||
gameVersionLabel->setAlignment(Qt::AlignLeft);
|
gameVersionLabel->setAlignment(Qt::AlignLeft);
|
||||||
gameInfoLayout->addWidget(gameVersionLabel);
|
gameInfoLayout->addWidget(gameVersionLabel);
|
||||||
|
|
||||||
if (m_gameSize.left(4) != "0.00") {
|
if (Config::GetLoadGameSizeEnabled()) {
|
||||||
QLabel* gameSizeLabel = new QLabel(tr("Size: ") + m_gameSize);
|
QLabel* gameSizeLabel = new QLabel(tr("Size: ") + m_gameSize);
|
||||||
gameSizeLabel->setAlignment(Qt::AlignLeft);
|
gameSizeLabel->setAlignment(Qt::AlignLeft);
|
||||||
gameInfoLayout->addWidget(gameSizeLabel);
|
gameInfoLayout->addWidget(gameSizeLabel);
|
||||||
|
@ -84,7 +84,9 @@ public:
|
|||||||
copyMenu->addAction(copyName);
|
copyMenu->addAction(copyName);
|
||||||
copyMenu->addAction(copySerial);
|
copyMenu->addAction(copySerial);
|
||||||
copyMenu->addAction(copyVersion);
|
copyMenu->addAction(copyVersion);
|
||||||
copyMenu->addAction(copySize);
|
if (Config::GetLoadGameSizeEnabled()) {
|
||||||
|
copyMenu->addAction(copySize);
|
||||||
|
}
|
||||||
copyMenu->addAction(copyNameAll);
|
copyMenu->addAction(copyNameAll);
|
||||||
|
|
||||||
menu.addMenu(copyMenu);
|
menu.addMenu(copyMenu);
|
||||||
@ -362,12 +364,18 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (selected == copyNameAll) {
|
if (selected == copyNameAll) {
|
||||||
|
QString GameSizeEnabled;
|
||||||
|
if (Config::GetLoadGameSizeEnabled()) {
|
||||||
|
GameSizeEnabled = " | Size:" + QString::fromStdString(m_games[itemID].size);
|
||||||
|
}
|
||||||
|
|
||||||
QClipboard* clipboard = QGuiApplication::clipboard();
|
QClipboard* clipboard = QGuiApplication::clipboard();
|
||||||
QString combinedText = QString("Name:%1 | Serial:%2 | Version:%3 | Size:%4")
|
QString combinedText = QString("Name:%1 | Serial:%2 | Version:%3%4")
|
||||||
.arg(QString::fromStdString(m_games[itemID].name))
|
.arg(QString::fromStdString(m_games[itemID].name))
|
||||||
.arg(QString::fromStdString(m_games[itemID].serial))
|
.arg(QString::fromStdString(m_games[itemID].serial))
|
||||||
.arg(QString::fromStdString(m_games[itemID].version))
|
.arg(QString::fromStdString(m_games[itemID].version))
|
||||||
.arg(QString::fromStdString(m_games[itemID].size));
|
.arg(GameSizeEnabled);
|
||||||
|
|
||||||
clipboard->setText(combinedText);
|
clipboard->setText(combinedText);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -290,6 +290,27 @@ void MainWindow::CreateConnects() {
|
|||||||
connect(settingsDialog, &SettingsDialog::CompatibilityChanged, this,
|
connect(settingsDialog, &SettingsDialog::CompatibilityChanged, this,
|
||||||
&MainWindow::RefreshGameTable);
|
&MainWindow::RefreshGameTable);
|
||||||
|
|
||||||
|
connect(settingsDialog, &SettingsDialog::accepted, this, &MainWindow::RefreshGameTable);
|
||||||
|
connect(settingsDialog, &SettingsDialog::rejected, this, &MainWindow::RefreshGameTable);
|
||||||
|
connect(settingsDialog, &SettingsDialog::close, this, &MainWindow::RefreshGameTable);
|
||||||
|
|
||||||
|
connect(settingsDialog, &SettingsDialog::BackgroundOpacityChanged, this,
|
||||||
|
[this](int opacity) {
|
||||||
|
Config::setBackgroundImageOpacity(opacity);
|
||||||
|
if (m_game_list_frame) {
|
||||||
|
QTableWidgetItem* current = m_game_list_frame->GetCurrentItem();
|
||||||
|
if (current) {
|
||||||
|
m_game_list_frame->SetListBackgroundImage(current);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (m_game_grid_frame) {
|
||||||
|
if (m_game_grid_frame->IsValidCellSelected()) {
|
||||||
|
m_game_grid_frame->SetGridBackgroundImage(m_game_grid_frame->crtRow,
|
||||||
|
m_game_grid_frame->crtColumn);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
settingsDialog->exec();
|
settingsDialog->exec();
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -302,6 +323,10 @@ void MainWindow::CreateConnects() {
|
|||||||
connect(settingsDialog, &SettingsDialog::CompatibilityChanged, this,
|
connect(settingsDialog, &SettingsDialog::CompatibilityChanged, this,
|
||||||
&MainWindow::RefreshGameTable);
|
&MainWindow::RefreshGameTable);
|
||||||
|
|
||||||
|
connect(settingsDialog, &SettingsDialog::accepted, this, &MainWindow::RefreshGameTable);
|
||||||
|
connect(settingsDialog, &SettingsDialog::rejected, this, &MainWindow::RefreshGameTable);
|
||||||
|
connect(settingsDialog, &SettingsDialog::close, this, &MainWindow::RefreshGameTable);
|
||||||
|
|
||||||
connect(settingsDialog, &SettingsDialog::BackgroundOpacityChanged, this,
|
connect(settingsDialog, &SettingsDialog::BackgroundOpacityChanged, this,
|
||||||
[this](int opacity) {
|
[this](int opacity) {
|
||||||
Config::setBackgroundImageOpacity(opacity);
|
Config::setBackgroundImageOpacity(opacity);
|
||||||
|
@ -197,6 +197,12 @@ SettingsDialog::SettingsDialog(std::span<const QString> physical_devices,
|
|||||||
|
|
||||||
// Gui TAB
|
// Gui TAB
|
||||||
{
|
{
|
||||||
|
connect(ui->backgroundImageOpacitySlider, &QSlider::valueChanged, this,
|
||||||
|
[this](int value) { emit BackgroundOpacityChanged(value); });
|
||||||
|
|
||||||
|
connect(ui->BGMVolumeSlider, &QSlider::valueChanged, this,
|
||||||
|
[](int value) { BackgroundMusicPlayer::getInstance().setVolume(value); });
|
||||||
|
|
||||||
connect(ui->chooseHomeTabComboBox, &QComboBox::currentTextChanged, this,
|
connect(ui->chooseHomeTabComboBox, &QComboBox::currentTextChanged, this,
|
||||||
[](const QString& hometab) { Config::setChooseHomeTab(hometab.toStdString()); });
|
[](const QString& hometab) { Config::setChooseHomeTab(hometab.toStdString()); });
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user