diff --git a/.github/workflows/windows-qt.yml b/.github/workflows/windows-qt.yml index 099ece0b..019a8ab2 100644 --- a/.github/workflows/windows-qt.yml +++ b/.github/workflows/windows-qt.yml @@ -29,8 +29,10 @@ jobs: uses: jurplel/install-qt-action@v4 with: version: 6.7.2 + host: windows + target: desktop arch: win64_msvc2019_64 - archives: qtsvg qtbase + archives: qtbase - name: Configure CMake # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. diff --git a/src/qt_gui/elf_viewer.cpp b/src/qt_gui/elf_viewer.cpp index 47a25914..72861d15 100644 --- a/src/qt_gui/elf_viewer.cpp +++ b/src/qt_gui/elf_viewer.cpp @@ -2,6 +2,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later #include + #include "elf_viewer.h" ElfViewer::ElfViewer(QWidget* parent) : QTableWidget(parent) { diff --git a/src/qt_gui/elf_viewer.h b/src/qt_gui/elf_viewer.h index fbf14d30..a3b85223 100644 --- a/src/qt_gui/elf_viewer.h +++ b/src/qt_gui/elf_viewer.h @@ -14,6 +14,7 @@ #include #include #include + #include "core/loader/elf.h" #include "game_list_frame.h" diff --git a/src/qt_gui/game_grid_frame.h b/src/qt_gui/game_grid_frame.h index 19ac531b..ce775315 100644 --- a/src/qt_gui/game_grid_frame.h +++ b/src/qt_gui/game_grid_frame.h @@ -14,6 +14,7 @@ #include #include #include + #include "common/config.h" #include "game_info.h" #include "game_list_utils.h" diff --git a/src/qt_gui/game_info.cpp b/src/qt_gui/game_info.cpp index 39cdeb75..0a472eae 100644 --- a/src/qt_gui/game_info.cpp +++ b/src/qt_gui/game_info.cpp @@ -5,6 +5,7 @@ #include #include #include + #include "game_info.h" GameInfoClass::GameInfoClass() = default; @@ -42,4 +43,4 @@ void GameInfoClass::GetGameInfo(QWidget* parent) { &QProgressDialog::setValue); dialog.exec(); -} \ No newline at end of file +} diff --git a/src/qt_gui/game_info.h b/src/qt_gui/game_info.h index c137a5a6..b2b102e0 100644 --- a/src/qt_gui/game_info.h +++ b/src/qt_gui/game_info.h @@ -7,6 +7,7 @@ #include #include #include + #include "common/config.h" #include "core/file_format/psf.h" #include "game_list_utils.h" diff --git a/src/qt_gui/game_install_dialog.cpp b/src/qt_gui/game_install_dialog.cpp index ab4fc273..4b2b8528 100644 --- a/src/qt_gui/game_install_dialog.cpp +++ b/src/qt_gui/game_install_dialog.cpp @@ -1,8 +1,6 @@ // SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later -#include "game_install_dialog.h" - #include #include #include @@ -14,6 +12,8 @@ #include #include +#include "game_install_dialog.h" + GameInstallDialog::GameInstallDialog() : m_gamesDirectory(nullptr) { auto layout = new QVBoxLayout(this); @@ -21,8 +21,8 @@ GameInstallDialog::GameInstallDialog() : m_gamesDirectory(nullptr) { layout->addStretch(); layout->addWidget(SetupDialogActions()); - setWindowTitle("Shadps4 - Choose directory"); - setWindowIcon(QIcon(":/images/shadps4.ico")); + setWindowTitle("shadPS4 - Choose directory"); + setWindowIcon(QIcon(":images/shadps4.ico")); } GameInstallDialog::~GameInstallDialog() {} @@ -47,7 +47,7 @@ QWidget* GameInstallDialog::SetupGamesDirectory() { layout->addWidget(m_gamesDirectory); // Browse button. - auto browse = new QPushButton("..."); + auto browse = new QPushButton("Browse"); connect(browse, &QPushButton::clicked, this, &GameInstallDialog::Browse); diff --git a/src/qt_gui/game_install_dialog.h b/src/qt_gui/game_install_dialog.h index abd447d9..6f439e81 100644 --- a/src/qt_gui/game_install_dialog.h +++ b/src/qt_gui/game_install_dialog.h @@ -4,6 +4,7 @@ #pragma once #include + #include "common/config.h" #include "common/path_util.h" diff --git a/src/qt_gui/game_list_frame.cpp b/src/qt_gui/game_list_frame.cpp index 4353964f..2699c961 100644 --- a/src/qt_gui/game_list_frame.cpp +++ b/src/qt_gui/game_list_frame.cpp @@ -190,17 +190,17 @@ void GameListFrame::SetRegionFlag(int row, int column, QString itemStr) { QTableWidgetItem* item = new QTableWidgetItem(); QImage scaledPixmap; if (itemStr == "Japan") { - scaledPixmap = QImage(":/images/flag_jp.png"); + scaledPixmap = QImage(":images/flag_jp.png"); } else if (itemStr == "Europe") { - scaledPixmap = QImage(":/images/flag_eu.png"); + scaledPixmap = QImage(":images/flag_eu.png"); } else if (itemStr == "USA") { - scaledPixmap = QImage(":/images/flag_us.png"); + scaledPixmap = QImage(":images/flag_us.png"); } else if (itemStr == "Asia") { - scaledPixmap = QImage(":/images/flag_china.png"); + scaledPixmap = QImage(":images/flag_china.png"); } else if (itemStr == "World") { - scaledPixmap = QImage(":/images/flag_world.png"); + scaledPixmap = QImage(":images/flag_world.png"); } else { - scaledPixmap = QImage(":/images/flag_unk.png"); + scaledPixmap = QImage(":images/flag_unk.png"); } QWidget* widget = new QWidget(this); QVBoxLayout* layout = new QVBoxLayout(widget); diff --git a/src/qt_gui/game_list_frame.h b/src/qt_gui/game_list_frame.h index e9f75afd..d8bccf46 100644 --- a/src/qt_gui/game_list_frame.h +++ b/src/qt_gui/game_list_frame.h @@ -16,6 +16,7 @@ #include #include #include + #include "game_info.h" #include "game_list_utils.h" #include "gui_context_menus.h" diff --git a/src/qt_gui/gui_context_menus.h b/src/qt_gui/gui_context_menus.h index 9f895360..146d5c34 100644 --- a/src/qt_gui/gui_context_menus.h +++ b/src/qt_gui/gui_context_menus.h @@ -165,12 +165,12 @@ public: if (createShortcutLinux(linkPath, ebootPath, iconPath)) { #endif QMessageBox::information( - nullptr, "Shortcut Creation", - QString("Shortcut created successfully:\n %1").arg(linkPath)); + nullptr, "Shortcut creation", + QString("Shortcut created successfully!\n %1").arg(linkPath)); } else { QMessageBox::critical( nullptr, "Error", - QString("Error creating shortcut:\n %1").arg(linkPath)); + QString("Error creating shortcut!\n %1").arg(linkPath)); } } else { QMessageBox::critical(nullptr, "Error", "Failed to convert icon."); @@ -183,11 +183,11 @@ public: if (createShortcutLinux(linkPath, ebootPath, iconPath)) { #endif QMessageBox::information( - nullptr, "Shortcut Creation", - QString("Shortcut created successfully:\n %1").arg(linkPath)); + nullptr, "Shortcut creation", + QString("Shortcut created successfully!\n %1").arg(linkPath)); } else { QMessageBox::critical(nullptr, "Error", - QString("Error creating shortcut:\n %1").arg(linkPath)); + QString("Error creating shortcut!\n %1").arg(linkPath)); } } } @@ -308,7 +308,7 @@ private: QFile shortcutFile(linkPath); if (!shortcutFile.open(QIODevice::WriteOnly | QIODevice::Text)) { QMessageBox::critical(nullptr, "Error", - QString("Error creating shortcut:\n %1").arg(linkPath)); + QString("Error creating shortcut!\n %1").arg(linkPath)); return false; } diff --git a/src/qt_gui/main_window.cpp b/src/qt_gui/main_window.cpp index 3f325ff4..b3778be0 100644 --- a/src/qt_gui/main_window.cpp +++ b/src/qt_gui/main_window.cpp @@ -8,6 +8,7 @@ #include #include #include + #include "common/io_file.h" #include "common/version.h" #include "core/file_format/pkg.h" diff --git a/src/qt_gui/main_window.h b/src/qt_gui/main_window.h index a7013738..d1ef48dc 100644 --- a/src/qt_gui/main_window.h +++ b/src/qt_gui/main_window.h @@ -10,6 +10,7 @@ #include #include #include + #include "common/config.h" #include "common/path_util.h" #include "core/file_format/psf.h" diff --git a/src/qt_gui/main_window_themes.cpp b/src/qt_gui/main_window_themes.cpp index 858bbb07..c89fa5a0 100644 --- a/src/qt_gui/main_window_themes.cpp +++ b/src/qt_gui/main_window_themes.cpp @@ -7,25 +7,6 @@ void WindowThemes::SetWindowTheme(Theme theme, QLineEdit* mw_searchbar) { QPalette themePalette; switch (theme) { - case Theme::Light: - mw_searchbar->setStyleSheet("background-color: #ffffff; /* Light gray background */" - "color: #000000; /* Black text */" - "padding: 5px;"); - themePalette.setColor(QPalette::Window, QColor(240, 240, 240)); // Light gray - themePalette.setColor(QPalette::WindowText, Qt::black); // Black - themePalette.setColor(QPalette::Base, QColor(230, 230, 230, 80)); // Grayish - themePalette.setColor(QPalette::ToolTipBase, Qt::black); // Black - themePalette.setColor(QPalette::ToolTipText, Qt::black); // Black - themePalette.setColor(QPalette::Text, Qt::black); // Black - themePalette.setColor(QPalette::Button, QColor(240, 240, 240)); // Light gray - themePalette.setColor(QPalette::ButtonText, Qt::black); // Black - themePalette.setColor(QPalette::BrightText, Qt::red); // Red - themePalette.setColor(QPalette::Link, QColor(42, 130, 218)); // Blue - themePalette.setColor(QPalette::Highlight, QColor(42, 130, 218)); // Blue - themePalette.setColor(QPalette::HighlightedText, Qt::white); // White - qApp->setPalette(themePalette); - break; - case Theme::Dark: mw_searchbar->setStyleSheet("background-color: #1e1e1e; /* Dark background */" "color: #ffffff; /* White text */" @@ -48,6 +29,25 @@ void WindowThemes::SetWindowTheme(Theme theme, QLineEdit* mw_searchbar) { qApp->setPalette(themePalette); break; + case Theme::Light: + mw_searchbar->setStyleSheet("background-color: #ffffff; /* Light gray background */" + "color: #000000; /* Black text */" + "padding: 5px;"); + themePalette.setColor(QPalette::Window, QColor(240, 240, 240)); // Light gray + themePalette.setColor(QPalette::WindowText, Qt::black); // Black + themePalette.setColor(QPalette::Base, QColor(230, 230, 230, 80)); // Grayish + themePalette.setColor(QPalette::ToolTipBase, Qt::black); // Black + themePalette.setColor(QPalette::ToolTipText, Qt::black); // Black + themePalette.setColor(QPalette::Text, Qt::black); // Black + themePalette.setColor(QPalette::Button, QColor(240, 240, 240)); // Light gray + themePalette.setColor(QPalette::ButtonText, Qt::black); // Black + themePalette.setColor(QPalette::BrightText, Qt::red); // Red + themePalette.setColor(QPalette::Link, QColor(42, 130, 218)); // Blue + themePalette.setColor(QPalette::Highlight, QColor(42, 130, 218)); // Blue + themePalette.setColor(QPalette::HighlightedText, Qt::white); // White + qApp->setPalette(themePalette); + break; + case Theme::Green: mw_searchbar->setStyleSheet("background-color: #354535; /* Dark green background */" "color: #ffffff; /* White text */" diff --git a/src/qt_gui/main_window_themes.h b/src/qt_gui/main_window_themes.h index 8b87fbce..6da70e99 100644 --- a/src/qt_gui/main_window_themes.h +++ b/src/qt_gui/main_window_themes.h @@ -2,13 +2,14 @@ // SPDX-License-Identifier: GPL-2.0-or-later #pragma once + #include #include #include enum class Theme : int { - Light, Dark, + Light, Green, Blue, Violet, diff --git a/src/qt_gui/main_window_ui.h b/src/qt_gui/main_window_ui.h index 7b5bf181..69d71847 100644 --- a/src/qt_gui/main_window_ui.h +++ b/src/qt_gui/main_window_ui.h @@ -44,8 +44,8 @@ public: QAction* gameInstallPathAct; QAction* dumpGameListAct; QAction* pkgViewerAct; - QAction* setThemeLight; QAction* setThemeDark; + QAction* setThemeLight; QAction* setThemeGreen; QAction* setThemeBlue; QAction* setThemeViolet; @@ -76,7 +76,7 @@ public: MainWindow->setObjectName("MainWindow"); // MainWindow->resize(1280, 720); QIcon icon; - icon.addFile(QString::fromUtf8(":/images/shadps4.ico"), QSize(), QIcon::Normal, QIcon::Off); + icon.addFile(QString::fromUtf8(":images/shadps4.ico"), QSize(), QIcon::Normal, QIcon::Off); MainWindow->setWindowIcon(icon); QSizePolicy sizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); sizePolicy.setHorizontalStretch(0); @@ -136,13 +136,13 @@ public: pkgViewerAct->setObjectName("pkgViewer"); pkgViewerAct->setObjectName("pkgViewer"); pkgViewerAct->setIcon(QIcon(":images/file_icon.png")); - setThemeLight = new QAction(MainWindow); - setThemeLight->setObjectName("setThemeLight"); - setThemeLight->setCheckable(true); - setThemeLight->setChecked(true); setThemeDark = new QAction(MainWindow); setThemeDark->setObjectName("setThemeDark"); setThemeDark->setCheckable(true); + setThemeDark->setChecked(true); + setThemeLight = new QAction(MainWindow); + setThemeLight->setObjectName("setThemeLight"); + setThemeLight->setCheckable(true); setThemeGreen = new QAction(MainWindow); setThemeGreen->setObjectName("setThemeGreen"); setThemeGreen->setCheckable(true); @@ -285,7 +285,7 @@ public: } // setupUi void retranslateUi(QMainWindow* MainWindow) { - MainWindow->setWindowTitle(QCoreApplication::translate("MainWindow", "Shadps4", nullptr)); + MainWindow->setWindowTitle(QCoreApplication::translate("MainWindow", "shadPS4", nullptr)); addElfFolderAct->setText( QCoreApplication::translate("MainWindow", "Open/Add Elf Folder", nullptr)); bootInstallPkgAct->setText( @@ -332,8 +332,8 @@ public: menuSettings->setTitle(QCoreApplication::translate("MainWindow", "Settings", nullptr)); menuUtils->setTitle(QCoreApplication::translate("MainWindow", "Utils", nullptr)); menuThemes->setTitle(QCoreApplication::translate("MainWindow", "Themes", nullptr)); - setThemeLight->setText(QCoreApplication::translate("MainWindow", "Light", nullptr)); setThemeDark->setText(QCoreApplication::translate("MainWindow", "Dark", nullptr)); + setThemeLight->setText(QCoreApplication::translate("MainWindow", "Light", nullptr)); setThemeGreen->setText(QCoreApplication::translate("MainWindow", "Green", nullptr)); setThemeBlue->setText(QCoreApplication::translate("MainWindow", "Blue", nullptr)); setThemeViolet->setText(QCoreApplication::translate("MainWindow", "Violet", nullptr)); diff --git a/src/qt_gui/pkg_viewer.cpp b/src/qt_gui/pkg_viewer.cpp index cf0b2167..cd2ce2b6 100644 --- a/src/qt_gui/pkg_viewer.cpp +++ b/src/qt_gui/pkg_viewer.cpp @@ -3,6 +3,7 @@ #include #include + #include "pkg_viewer.h" PKGViewer::PKGViewer(std::shared_ptr game_info_get, QWidget* parent, diff --git a/src/qt_gui/pkg_viewer.h b/src/qt_gui/pkg_viewer.h index 0e0a8706..e040d595 100644 --- a/src/qt_gui/pkg_viewer.h +++ b/src/qt_gui/pkg_viewer.h @@ -15,6 +15,7 @@ #include #include #include + #include "common/io_file.h" #include "core/file_format/pkg.h" #include "core/file_format/pkg_type.h" diff --git a/src/qt_gui/trophy_viewer.h b/src/qt_gui/trophy_viewer.h index ab79ac50..2b794593 100644 --- a/src/qt_gui/trophy_viewer.h +++ b/src/qt_gui/trophy_viewer.h @@ -16,6 +16,7 @@ #include #include #include + #include "common/types.h" #include "core/file_format/trp.h"