diff --git a/src/qt/assets/86box.png b/src/qt/assets/86box.png deleted file mode 100644 index a90f63040..000000000 Binary files a/src/qt/assets/86box.png and /dev/null differ diff --git a/src/qt/icons/green-square-16.png b/src/qt/icons/green-square-16.png deleted file mode 100644 index cb42c38eb..000000000 Binary files a/src/qt/icons/green-square-16.png and /dev/null differ diff --git a/src/qt/icons/pause-16.png b/src/qt/icons/pause-16.png deleted file mode 100644 index 375780232..000000000 Binary files a/src/qt/icons/pause-16.png and /dev/null differ diff --git a/src/qt/icons/play-16.png b/src/qt/icons/play-16.png deleted file mode 100644 index bde40f503..000000000 Binary files a/src/qt/icons/play-16.png and /dev/null differ diff --git a/src/qt/icons/red-power-16.png b/src/qt/icons/red-power-16.png deleted file mode 100644 index c90ef491f..000000000 Binary files a/src/qt/icons/red-power-16.png and /dev/null differ diff --git a/src/qt/icons/red-square-16.png b/src/qt/icons/red-square-16.png deleted file mode 100644 index 32faa7cdc..000000000 Binary files a/src/qt/icons/red-square-16.png and /dev/null differ diff --git a/src/qt/icons/stop-16.png b/src/qt/icons/stop-16.png deleted file mode 100644 index d73cad140..000000000 Binary files a/src/qt/icons/stop-16.png and /dev/null differ diff --git a/src/qt/icons/yellow-square-16.png b/src/qt/icons/yellow-square-16.png deleted file mode 100644 index 197cf394e..000000000 Binary files a/src/qt/icons/yellow-square-16.png and /dev/null differ diff --git a/src/qt/qt_about.cpp b/src/qt/qt_about.cpp index f36282797..c47acd055 100644 --- a/src/qt/qt_about.cpp +++ b/src/qt/qt_about.cpp @@ -19,6 +19,7 @@ * Copyright 2022 dob205 */ #include "qt_about.hpp" +#include "qt_defs.hpp" extern "C" { #include <86box/86box.h> @@ -57,15 +58,7 @@ About::About(QWidget *parent) webSiteButton->connect(webSiteButton, &QPushButton::released, []() { QDesktopServices::openUrl(QUrl("https://" EMU_SITE)); }); -#ifdef RELEASE_BUILD - setIconPixmap(QIcon(":/settings/qt/icons/86Box-green.ico").pixmap(32, 32)); -#elif defined ALPHA_BUILD - setIconPixmap(QIcon(":/settings/qt/icons/86Box-red.ico").pixmap(32, 32)); -#elif defined BETA_BUILD - setIconPixmap(QIcon(":/settings/qt/icons/86Box-yellow.ico").pixmap(32, 32)); -#else - setIconPixmap(QIcon(":/settings/qt/icons/86Box-gray.ico").pixmap(32, 32)); -#endif + setIconPixmap(QIcon(EMU_ICON_PATH).pixmap(32, 32)); setWindowFlags(Qt::Dialog | Qt::CustomizeWindowHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint); } diff --git a/src/qt/qt_defs.hpp b/src/qt/qt_defs.hpp index 58de88b67..c96c15256 100644 --- a/src/qt/qt_defs.hpp +++ b/src/qt/qt_defs.hpp @@ -2,9 +2,19 @@ #define QT_DEFS_HPP #if QT_VERSION >= QT_VERSION_CHECK(6, 7, 0) -#define CHECK_STATE_CHANGED checkStateChanged +# define CHECK_STATE_CHANGED checkStateChanged #else -#define CHECK_STATE_CHANGED stateChanged +# define CHECK_STATE_CHANGED stateChanged +#endif + +#ifdef RELEASE_BUILD +# define EMU_ICON_PATH ":/settings/qt/icons/86Box-green.ico" +#elif defined ALPHA_BUILD +# define EMU_ICON_PATH ":/settings/qt/icons/86Box-red.ico" +#elif defined BETA_BUILD +# define EMU_ICON_PATH ":/settings/qt/icons/86Box-yellow.ico" +#else +# define EMU_ICON_PATH ":/settings/qt/icons/86Box-gray.ico" #endif #endif // QT_DEFS_HPP diff --git a/src/qt/qt_machinestatus.cpp b/src/qt/qt_machinestatus.cpp index 668ebaf62..751506e76 100644 --- a/src/qt/qt_machinestatus.cpp +++ b/src/qt/qt_machinestatus.cpp @@ -772,9 +772,9 @@ MachineStatus::refresh(QStatusBar *sbar) if (rdisk_drives[i].bus_type == RDISK_BUS_DISABLED) { d->rdisk[i].pixmaps = &d->pixmaps.rdisk_disabled; } else if ((t == RDISK_TYPE_ZIP_100) || (t == RDISK_TYPE_ZIP_250)) { - d->fdd[i].pixmaps = &d->pixmaps.zip; + d->rdisk[i].pixmaps = &d->pixmaps.zip; } else { - d->fdd[i].pixmaps = &d->pixmaps.rdisk; + d->rdisk[i].pixmaps = &d->pixmaps.rdisk; } d->rdisk[i].label = std::make_unique(); d->rdisk[i].setEmpty(QString(rdisk_drives[i].image_path).isEmpty()); diff --git a/src/qt/qt_main.cpp b/src/qt/qt_main.cpp index fd4bc5610..4b79c3acc 100644 --- a/src/qt/qt_main.cpp +++ b/src/qt/qt_main.cpp @@ -75,6 +75,7 @@ extern "C" { #include #include +#include "qt_defs.hpp" #include "qt_mainwindow.hpp" #include "qt_progsettings.hpp" #include "qt_settings.hpp" @@ -627,16 +628,7 @@ main(int argc, char *argv[]) #endif #ifndef Q_OS_MACOS -# ifdef RELEASE_BUILD - app.setWindowIcon(QIcon(":/settings/qt/icons/86Box-green.ico")); -# elif defined ALPHA_BUILD - app.setWindowIcon(QIcon(":/settings/qt/icons/86Box-red.ico")); -# elif defined BETA_BUILD - app.setWindowIcon(QIcon(":/settings/qt/icons/86Box-yellow.ico")); -# else - app.setWindowIcon(QIcon(":/settings/qt/icons/86Box-gray.ico")); -# endif - + app.setWindowIcon(QIcon(EMU_ICON_PATH)); # ifdef Q_OS_UNIX app.setDesktopFileName("net.86box.86Box"); # endif diff --git a/src/qt/qt_updatedetails.cpp b/src/qt/qt_updatedetails.cpp index 1d5b910d1..bba232e69 100644 --- a/src/qt/qt_updatedetails.cpp +++ b/src/qt/qt_updatedetails.cpp @@ -14,6 +14,7 @@ */ #include "qt_updatedetails.hpp" #include "ui_qt_updatedetails.h" +#include "qt_defs.hpp" #include #include @@ -52,7 +53,7 @@ UpdateDetails:: connect(ui->buttonBox, &QDialogButtonBox::accepted, [updateResult] { visitDownloadPage(updateResult.channel); }); - const auto logo = QPixmap(":/assets/86box.png").scaled(QSize(64, 64), Qt::KeepAspectRatio, Qt::SmoothTransformation); + const auto logo = QIcon(EMU_ICON_PATH).pixmap(QSize(64, 64)); ui->icon->setPixmap(logo); } diff --git a/src/qt/qt_vmmanager_addmachine.cpp b/src/qt/qt_vmmanager_addmachine.cpp index b8bed2fe5..6ff2a87a7 100644 --- a/src/qt/qt_vmmanager_addmachine.cpp +++ b/src/qt/qt_vmmanager_addmachine.cpp @@ -38,11 +38,6 @@ VMManagerAddMachine:: setPage(Page_NameAndLocation, new NameAndLocationPage); setPage(Page_Conclusion, new ConclusionPage); - // Need to create a better image - // QPixmap originalPixmap(":/assets/86box.png"); - // QPixmap scaledPixmap = originalPixmap.scaled(150, 150, Qt::KeepAspectRatio); - QPixmap wizardPixmap(":/assets/86box-wizard.png"); - #ifndef Q_OS_MACOS setWizardStyle(ModernStyle); setPixmap(LogoPixmap, QPixmap(":assets/addvm-logo.png")); diff --git a/src/qt_resources.qrc b/src/qt_resources.qrc index 1d6581fa9..5c125a9ba 100644 --- a/src/qt_resources.qrc +++ b/src/qt_resources.qrc @@ -83,7 +83,6 @@ qt/texture_frag.spv - qt/assets/86box.png qt/assets/86box-wizard.png qt/assets/addvm-logo.png qt/assets/addvm-watermark.png