From 8f3098fc1eca0ba58200b2cac743106d8feca0e8 Mon Sep 17 00:00:00 2001 From: Kyle K <190571+Docteh@users.noreply.github.com> Date: Sat, 14 May 2022 21:14:13 -0700 Subject: about dialog: Fix the logo in a multiplatform way The Icon was renamed in #8283 for Linux builds, and the fix proposed in #8312 would in turn break the icon for Windows users. I've decided to fix the aboutdialog.ui file via qtcreator. I'm not sure its important to have the yuzu icon inside the About dialog grabbed from the local Qt theme, but I've reword how the code works for that, and we can just delete those lines. I've also thrown the yuzu.png through pngcrush to remove this warning libpng warning: iCCP: known incorrect sRGB profile Credit to abouvier for bringing bug up. --- src/yuzu/about_dialog.cpp | 6 +++++- src/yuzu/aboutdialog.ui | 16 ++++++++++++++-- 2 files changed, 19 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/yuzu/about_dialog.cpp b/src/yuzu/about_dialog.cpp index cbcef7b45..eeff54359 100644 --- a/src/yuzu/about_dialog.cpp +++ b/src/yuzu/about_dialog.cpp @@ -19,7 +19,11 @@ AboutDialog::AboutDialog(QWidget* parent) const auto yuzu_build_version = override_build.empty() ? yuzu_build : override_build; ui->setupUi(this); - ui->labelLogo->setPixmap(QIcon::fromTheme(QStringLiteral("yuzu")).pixmap(200)); + // Try and request the icon from Qt theme (Linux?) + const QIcon yuzu_logo = QIcon::fromTheme(QStringLiteral("org.yuzu_emu.yuzu")); + if (!yuzu_logo.isNull()) { + ui->labelLogo->setPixmap(yuzu_logo.pixmap(200)); + } ui->labelBuildInfo->setText( ui->labelBuildInfo->text().arg(QString::fromStdString(yuzu_build_version), QString::fromUtf8(Common::g_build_date).left(10))); diff --git a/src/yuzu/aboutdialog.ui b/src/yuzu/aboutdialog.ui index 2f7ddc7f3..1dd7b74bf 100644 --- a/src/yuzu/aboutdialog.ui +++ b/src/yuzu/aboutdialog.ui @@ -26,8 +26,20 @@ 0 + + + 200 + 200 + + - <html><head/><body><p><img src=":/icons/yuzu.png"/></p></body></html> + + + + :/icons/default/256x256/yuzu.png + + + true @@ -152,7 +164,7 @@ p, li { white-space: pre-wrap; } - + -- cgit v1.2.3