qt: Fixed Azahar icon being accessed incorrectly in about + window icon

This commit is contained in:
OpenSauce04 2025-07-31 17:24:36 +01:00 committed by OpenSauce
parent 36a0b7824d
commit 4b4d4f09da
3 changed files with 6 additions and 4 deletions

View File

@ -11,7 +11,6 @@ AboutDialog::AboutDialog(QWidget* parent)
: QDialog(parent, Qt::WindowTitleHint | Qt::WindowCloseButtonHint | Qt::WindowSystemMenuHint),
ui(std::make_unique<Ui::AboutDialog>()) {
ui->setupUi(this);
ui->labelLogo->setPixmap(QIcon::fromTheme(QStringLiteral("azahar")).pixmap(200));
ui->labelBuildInfo->setText(ui->labelBuildInfo->text().arg(
QString::fromUtf8(Common::g_build_fullname), QString::fromUtf8(Common::g_scm_branch),
QString::fromUtf8(Common::g_scm_desc), QString::fromUtf8(Common::g_build_date).left(10)));

View File

@ -27,7 +27,7 @@
</sizepolicy>
</property>
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/icons/azahar.png&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/icons/default/256x256/azahar.png&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>

View File

@ -9,6 +9,7 @@
#include <thread>
#include <QFileDialog>
#include <QFutureWatcher>
#include <QIcon>
#include <QLabel>
#include <QMessageBox>
#include <QPalette>
@ -330,8 +331,6 @@ GMainWindow::GMainWindow(Core::System& system_)
ui->setupUi(this);
statusBar()->hide();
setWindowIcon(QIcon(QString::fromStdString(":/icons/azahar.png")));
default_theme_paths = QIcon::themeSearchPaths();
UpdateUITheme();
@ -390,6 +389,10 @@ GMainWindow::GMainWindow(Core::System& system_)
LOG_INFO(Frontend, "Host Swap: {:.2f} GiB", mem_info.total_swap_memory / f64{1_GiB});
UpdateWindowTitle();
QIcon azahar_icon = QIcon(QString::fromStdString(":/icons/default/256x256/azahar.png"));
render_window->setWindowIcon(azahar_icon);
secondary_window->setWindowIcon(azahar_icon);
show();
#ifdef ENABLE_QT_UPDATE_CHECKER