[education/rkward] /: Fix RKWard icons (where not used as window icon) on Windows
Thomas Friedrichsmeier
null at kde.org
Mon May 9 18:43:13 BST 2022
Git commit 5a94bc6519f9abd70b0ae6c7c1dc8492c74aa971 by Thomas Friedrichsmeier.
Committed on 09/05/2022 at 17:42.
Pushed by tfry into branch 'master'.
Fix RKWard icons (where not used as window icon) on Windows
M +0 -1 ChangeLog
M +2 -0 rkward/icons/app-icon/CMakeLists.txt
M +8 -1 rkward/misc/rkstandardicons.cpp
https://invent.kde.org/education/rkward/commit/5a94bc6519f9abd70b0ae6c7c1dc8492c74aa971
diff --git a/ChangeLog b/ChangeLog
index 76042f08..b28e091f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,5 @@
TODOs:
- More tolerant handshake on Windows? Simply a matter of allowing more time?
- - Fix RKWard-app icon on Windows
- If stored config is older than 0.6.3, discard it, entirely
- Plugin maps with the same id are grouped together, and the most recent version is used, automatically
diff --git a/rkward/icons/app-icon/CMakeLists.txt b/rkward/icons/app-icon/CMakeLists.txt
index 0e1cdb58..ec00b6c0 100644
--- a/rkward/icons/app-icon/CMakeLists.txt
+++ b/rkward/icons/app-icon/CMakeLists.txt
@@ -1 +1,3 @@
ECM_INSTALL_ICONS(ICONS 16-apps-rkward.png 22-apps-rkward.png 32-apps-rkward.png 48-apps-rkward.png 64-apps-rkward.png 128-apps-rkward.png sc-apps-rkward.svgz DESTINATION ${ICON_INSTALL_DIR})
+
+INSTALL(FILES 64-apps-rkward.png DESTINATION ${DATA_INSTALL_DIR}/rkward/icons) # see rkstandardicons.cpp
diff --git a/rkward/misc/rkstandardicons.cpp b/rkward/misc/rkstandardicons.cpp
index 67a30ca6..a59dc253 100644
--- a/rkward/misc/rkstandardicons.cpp
+++ b/rkward/misc/rkstandardicons.cpp
@@ -7,6 +7,8 @@ SPDX-License-Identifier: GPL-2.0-or-later
#include "rkstandardicons.h"
+#include <QFileInfo>
+
#include "../core/robject.h"
#include "../core/robjectlist.h"
#include "../windows/rkmdiwindow.h"
@@ -120,7 +122,12 @@ void RKStandardIcons::doInitIcons () {
icons[DocumentPDF] = QIcon::fromTheme("application-pdf");
- icons[RKWardIcon] = QIcon::fromTheme("rkward"); // this used to be accessible as QApplication::windowIcon(), but apparently no longer in Qt5
+ // this used to be accessible as QApplication::windowIcon(), but apparently no longer in Qt5
+ if (QFileInfo::exists(rkward_icon_base + "64-apps-rkward.png")) {
+ icons[RKWardIcon] = QIcon(rkward_icon_base + "64-apps-rkward.png");
+ } else {
+ icons[RKWardIcon] = QIcon::fromTheme("rkward"); // Does not work on Windows, thus only used as fallback
+ }
RK_DO ({
for (int i = ActionRunAll; i < Last; ++i) {
More information about the rkward-tracker
mailing list