qt: Set the window icon per-application, instead of per-window
This commit is contained in:
@@ -194,6 +194,17 @@ main(int argc, char *argv[])
|
|||||||
QApplication::setFont(QFont(font_name, font_size.toInt()));
|
QApplication::setFont(QFont(font_name, font_size.toInt()));
|
||||||
SetCurrentProcessExplicitAppUserModelID(L"86Box.86Box");
|
SetCurrentProcessExplicitAppUserModelID(L"86Box.86Box");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef RELEASE_BUILD
|
||||||
|
app.setWindowIcon(QIcon(":/settings/win/icons/86Box-green.ico"));
|
||||||
|
#elif defined ALPHA_BUILD
|
||||||
|
app.setWindowIcon(QIcon(":/settings/win/icons/86Box-red.ico"));
|
||||||
|
#elif defined BETA_BUILD
|
||||||
|
app.setWindowIcon(QIcon(":/settings/win/icons/86Box-yellow.ico"));
|
||||||
|
#else
|
||||||
|
app.setWindowIcon(QIcon(":/settings/win/icons/86Box-gray.ico"));
|
||||||
|
#endif
|
||||||
|
|
||||||
if (!pc_init_modules()) {
|
if (!pc_init_modules()) {
|
||||||
ui_msgbox_header(MBX_FATAL, (void *) IDS_2121, (void *) IDS_2056);
|
ui_msgbox_header(MBX_FATAL, (void *) IDS_2121, (void *) IDS_2056);
|
||||||
return 6;
|
return 6;
|
||||||
|
@@ -196,15 +196,6 @@ MainWindow::MainWindow(QWidget *parent)
|
|||||||
auto toolbar_label = new QLabel();
|
auto toolbar_label = new QLabel();
|
||||||
ui->toolBar->addWidget(toolbar_label);
|
ui->toolBar->addWidget(toolbar_label);
|
||||||
|
|
||||||
#ifdef RELEASE_BUILD
|
|
||||||
this->setWindowIcon(QIcon(":/settings/win/icons/86Box-green.ico"));
|
|
||||||
#elif defined ALPHA_BUILD
|
|
||||||
this->setWindowIcon(QIcon(":/settings/win/icons/86Box-red.ico"));
|
|
||||||
#elif defined BETA_BUILD
|
|
||||||
this->setWindowIcon(QIcon(":/settings/win/icons/86Box-yellow.ico"));
|
|
||||||
#else
|
|
||||||
this->setWindowIcon(QIcon(":/settings/win/icons/86Box-gray.ico"));
|
|
||||||
#endif
|
|
||||||
this->setWindowFlag(Qt::MSWindowsFixedSizeDialogHint, vid_resize != 1);
|
this->setWindowFlag(Qt::MSWindowsFixedSizeDialogHint, vid_resize != 1);
|
||||||
this->setWindowFlag(Qt::WindowMaximizeButtonHint, vid_resize == 1);
|
this->setWindowFlag(Qt::WindowMaximizeButtonHint, vid_resize == 1);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user