Merge pull request #6853 from lemondrops/icons

Icon cleanup and fixes
This commit is contained in:
Miran Grča
2026-02-27 08:08:44 +01:00
committed by GitHub
15 changed files with 20 additions and 30 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 846 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 115 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 123 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 156 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 174 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 118 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 120 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 117 B

View File

@@ -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);
}

View File

@@ -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

View File

@@ -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<ClickableLabel>();
d->rdisk[i].setEmpty(QString(rdisk_drives[i].image_path).isEmpty());

View File

@@ -75,6 +75,7 @@ extern "C" {
#include <iostream>
#include <memory>
#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

View File

@@ -14,6 +14,7 @@
*/
#include "qt_updatedetails.hpp"
#include "ui_qt_updatedetails.h"
#include "qt_defs.hpp"
#include <QDesktopServices>
#include <QPushButton>
@@ -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);
}

View File

@@ -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"));

View File

@@ -83,7 +83,6 @@
<file alias="/texture_frag.spv">qt/texture_frag.spv</file>
</qresource>
<qresource prefix="/assets">
<file alias="86box.png">qt/assets/86box.png</file>
<file alias="86box-wizard.png">qt/assets/86box-wizard.png</file>
<file alias="addvm-logo.png">qt/assets/addvm-logo.png</file>
<file alias="addvm-watermark.png">qt/assets/addvm-watermark.png</file>