diff --git a/rpcs3/rpcs3_app.cpp b/rpcs3/rpcs3_app.cpp index 1c58fb3cbf..6dddf28808 100644 --- a/rpcs3/rpcs3_app.cpp +++ b/rpcs3/rpcs3_app.cpp @@ -63,6 +63,9 @@ rpcs3_app::rpcs3_app(int& argc, char** argv) : QApplication(argc, argv) void rpcs3_app::Init() { + setApplicationName("RPCS3"); + setWindowIcon(QIcon(":/rpcs3.ico")); + Emu.Init(); guiSettings.reset(new gui_settings()); @@ -79,7 +82,6 @@ void rpcs3_app::Init() RPCS3MainWin->Init(); - setApplicationName("RPCS3"); RPCS3MainWin->show(); // Create the thumbnail toolbar after the main_window is created diff --git a/rpcs3/rpcs3qt/main_window.cpp b/rpcs3/rpcs3qt/main_window.cpp index db163c7cce..6d10aa87fc 100644 --- a/rpcs3/rpcs3qt/main_window.cpp +++ b/rpcs3/rpcs3qt/main_window.cpp @@ -76,8 +76,6 @@ void main_window::Init() setAcceptDrops(true); - m_appIcon = QIcon(":/rpcs3.ico"); - // hide utilities from the average user ui->menuUtilities->menuAction()->setVisible(guiSettings->GetValue(GUI::m_showDebugTab).toBool()); @@ -107,7 +105,6 @@ void main_window::Init() setMinimumSize(350, minimumSizeHint().height()); // seems fine on win 10 setWindowTitle(QString::fromStdString("RPCS3 v" + rpcs3::version.to_string())); - !m_appIcon.isNull() ? setWindowIcon(m_appIcon) : LOG_WARNING(GENERAL, "AppImage could not be loaded!"); Q_EMIT RequestGlobalStylesheetChange(guiSettings->GetCurrentStylesheetPath()); ConfigureGuiFromSettings(true); @@ -131,7 +128,6 @@ void main_window::Init() QMessageBox msg; msg.setWindowTitle("Experimental Build Warning"); - msg.setWindowIcon(m_appIcon); msg.setIcon(QMessageBox::Critical); msg.setTextFormat(Qt::RichText); msg.setStandardButtons(QMessageBox::Yes | QMessageBox::No); @@ -196,7 +192,7 @@ QIcon main_window::GetAppIcon() } // loads the appIcon from path and embeds it centered into an empty square icon -void main_window::SetAppIconFromPath(const std::string path) +void main_window::SetAppIconFromPath(const std::string& path) { // get Icon for the gs_frame from path. this handles presumably all possible use cases QString qpath = qstr(path); @@ -214,7 +210,7 @@ void main_window::SetAppIconFromPath(const std::string path) // load the image from path. It will most likely be a rectangle QImage source = QImage(qstr(ico)); int edgeMax = std::max(source.width(), source.height()); - + // create a new transparent image with square size and same format as source (maybe handle other formats than RGB32 as well?) QImage::Format format = source.format() == QImage::Format_RGB32 ? QImage::Format_ARGB32 : source.format(); QImage dest = QImage(edgeMax, edgeMax, format); @@ -236,7 +232,7 @@ void main_window::SetAppIconFromPath(const std::string path) } } // if nothing was found reset the icon to default - m_appIcon = QIcon(":/rpcs3.ico"); + m_appIcon = QApplication::windowIcon(); } void main_window::BootElf() diff --git a/rpcs3/rpcs3qt/main_window.h b/rpcs3/rpcs3qt/main_window.h index 5dc18e1788..e15d29483c 100644 --- a/rpcs3/rpcs3qt/main_window.h +++ b/rpcs3/rpcs3qt/main_window.h @@ -100,7 +100,7 @@ protected: void dragEnterEvent(QDragEnterEvent* event) override; void dragMoveEvent(QDragMoveEvent* event) override; void dragLeaveEvent(QDragLeaveEvent* event) override; - void SetAppIconFromPath(const std::string path); + void SetAppIconFromPath(const std::string& path); private: void RepaintToolbar(); void RepaintToolBarIcons(); diff --git a/rpcs3/rpcs3qt/msg_dialog_frame.h b/rpcs3/rpcs3qt/msg_dialog_frame.h index 7d89d72718..6c2f037250 100644 --- a/rpcs3/rpcs3qt/msg_dialog_frame.h +++ b/rpcs3/rpcs3qt/msg_dialog_frame.h @@ -81,8 +81,6 @@ public: explicit custom_dialog(bool disableCancel, QWidget* parent = 0) : QDialog(parent), m_disable_cancel(disableCancel) { - setWindowIcon(QIcon(":/rpcs3.ico")); - if (m_disable_cancel) { setWindowFlags(windowFlags() & ~Qt::WindowCloseButtonHint); diff --git a/rpcs3/rpcs3qt/save_data_info_dialog.cpp b/rpcs3/rpcs3qt/save_data_info_dialog.cpp index 5086bc795d..931d3438a0 100644 --- a/rpcs3/rpcs3qt/save_data_info_dialog.cpp +++ b/rpcs3/rpcs3qt/save_data_info_dialog.cpp @@ -11,7 +11,6 @@ save_data_info_dialog::save_data_info_dialog(const SaveDataEntry& save, QWidget* { setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); setWindowTitle(tr("Save Data Information")); - setWindowIcon(QIcon(":/rpcs3.ico")); // Table m_list = new QTableWidget(this); diff --git a/rpcs3/rpcs3qt/save_data_list_dialog.cpp b/rpcs3/rpcs3qt/save_data_list_dialog.cpp index b7c1a698d2..554b477726 100644 --- a/rpcs3/rpcs3qt/save_data_list_dialog.cpp +++ b/rpcs3/rpcs3qt/save_data_list_dialog.cpp @@ -32,7 +32,6 @@ save_data_list_dialog::save_data_list_dialog(const std::vector& e setWindowTitle(tr("Save Data Interface (Save)")); } - setWindowIcon(QIcon(":/rpcs3.ico")); setMinimumSize(QSize(400, 400)); // Table diff --git a/rpcs3/rpcs3qt/save_manager_dialog.cpp b/rpcs3/rpcs3qt/save_manager_dialog.cpp index a8d03527d0..3e61564554 100644 --- a/rpcs3/rpcs3qt/save_manager_dialog.cpp +++ b/rpcs3/rpcs3qt/save_manager_dialog.cpp @@ -85,7 +85,6 @@ save_manager_dialog::save_manager_dialog(std::string dir, QWidget* parent) : QDi { setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); setWindowTitle(tr("Save Manager")); - setWindowIcon(QIcon(":/rpcs3.ico")); setMinimumSize(QSize(400, 400)); Init(dir); diff --git a/rpcs3/rpcs3qt/trophy_manager_dialog.cpp b/rpcs3/rpcs3qt/trophy_manager_dialog.cpp index d3b560051d..4d333650a3 100644 --- a/rpcs3/rpcs3qt/trophy_manager_dialog.cpp +++ b/rpcs3/rpcs3qt/trophy_manager_dialog.cpp @@ -43,7 +43,6 @@ trophy_manager_dialog::trophy_manager_dialog() : QWidget(), m_sort_column(0), m_ // Nonspecific widget settings setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); setWindowTitle(tr("Trophy Manager")); - setWindowIcon(QIcon(":/rpcs3.ico")); // HACK: dev_hdd0 must be mounted for vfs to work for loading trophies. const std::string emu_dir_ = g_cfg.vfs.emulator_dir;