diff --git a/debian/patches/0024-fixed-a0625c7-from-https-gitee.com-yangxibowen-qt5-u.patch b/debian/patches/0024-fixed-a0625c7-from-https-gitee.com-yangxibowen-qt5-u.patch new file mode 100644 index 0000000..3ebab31 --- /dev/null +++ b/debian/patches/0024-fixed-a0625c7-from-https-gitee.com-yangxibowen-qt5-u.patch @@ -0,0 +1,59 @@ +From: guorongfei +Date: Mon, 8 Jan 2024 20:17:39 +0800 +Subject: fixed a0625c7 from + https://gitee.com/yangxibowen/qt5-ukui-platformtheme/pulls/87 fix: icon + theme search path + +--- + qt5-ukui-platformtheme/qt5-ukui-platform-theme.cpp | 16 ++++++++++++++-- + qt5-ukui-platformtheme/qt5-ukui-platform-theme.h | 3 +++ + 2 files changed, 17 insertions(+), 2 deletions(-) + +diff --git a/qt5-ukui-platformtheme/qt5-ukui-platform-theme.cpp b/qt5-ukui-platformtheme/qt5-ukui-platform-theme.cpp +index f70e313..5f4e69a 100644 +--- a/qt5-ukui-platformtheme/qt5-ukui-platform-theme.cpp ++++ b/qt5-ukui-platformtheme/qt5-ukui-platform-theme.cpp +@@ -238,8 +238,7 @@ QVariant Qt5UKUIPlatformTheme::themeHint(ThemeHint hint) const + case QPlatformTheme::SystemIconFallbackThemeName: + return "hicolor"; + case QPlatformTheme::IconThemeSearchPaths: +- //FIXME: +- return QStringList()<<".local/share/icons"<<"/usr/share/icons"<<"/usr/local/share/icons"; ++ return xdgIconThemePaths(); + // case WheelScrollLines: + // { + // return QVariant(1); +@@ -250,6 +249,19 @@ QVariant Qt5UKUIPlatformTheme::themeHint(ThemeHint hint) const + return QPlatformTheme::themeHint(hint); + } + ++QStringList Qt5UKUIPlatformTheme::xdgIconThemePaths() const { ++ QStringList paths; ++ // Add home directory first in search path ++ const QFileInfo homeIconDir(QDir::homePath() + QLatin1String("/.icons")); ++ if (homeIconDir.isDir()) ++ paths.prepend(homeIconDir.absoluteFilePath()); ++ ++ paths.append(QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, ++ QStringLiteral("icons"), ++ QStandardPaths::LocateDirectory)); ++ return paths; ++} ++ + QIconEngine *Qt5UKUIPlatformTheme::createIconEngine(const QString &iconName) const + { + // QPluginLoader l(XDG_ICON_ENGINE_PATH); +diff --git a/qt5-ukui-platformtheme/qt5-ukui-platform-theme.h b/qt5-ukui-platformtheme/qt5-ukui-platform-theme.h +index a1b4cbe..086271c 100644 +--- a/qt5-ukui-platformtheme/qt5-ukui-platform-theme.h ++++ b/qt5-ukui-platformtheme/qt5-ukui-platform-theme.h +@@ -89,6 +89,9 @@ public: + public Q_SLOTS: + void slotChangeStyle(const QString& key); + ++private: ++ QStringList xdgIconThemePaths() const; ++ + private: + QFont m_system_font; + QFont m_fixed_font; diff --git a/debian/patches/series b/debian/patches/series index a823d2c..44574a3 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -21,3 +21,4 @@ 0021-Update-changelog-4.1.0.0-0k23.patch 0022-Add-rounded-corners-for-tabbar-hover-state.patch 0023-Refresh-update-changelog-4.1.0.0-0k24.patch +0024-fixed-a0625c7-from-https-gitee.com-yangxibowen-qt5-u.patch