Commit dc8a2cf5 authored by Weixuan Xiao's avatar Weixuan Xiao Committed by Aleix Pol Gonzalez
Browse files

Fix missing icons on macOS

parent 03a1357a
Pipeline #18492 canceled with stage
......@@ -10,6 +10,12 @@ else()
list(APPEND APP_ICONS sc-apps-kdeconnectindicatordark.svg)
endif()
if(APPLE)
# Craft adds share/icons into blacklist, which will not be copied into the bundle
# As a workaround, on macOS, set ICON_INSTALL_DIR to another path
set(ICON_INSTALL_DIR share/kdeconnect-icons)
endif()
ecm_install_icons(
ICONS
${APP_ICONS}
......
......@@ -61,7 +61,7 @@ void IndicatorHelper::postInit()
void IndicatorHelper::iconPathHook()
{
const QString iconPath = QStandardPaths::locate(QStandardPaths::AppDataLocation, QStringLiteral("icons"), QStandardPaths::LocateDirectory);
const QString iconPath = QStandardPaths::locate(QStandardPaths::AppDataLocation, QStringLiteral("kdeconnect-icons"), QStandardPaths::LocateDirectory);
if (!iconPath.isNull()) {
QStringList themeSearchPaths = QIcon::themeSearchPaths();
themeSearchPaths << iconPath;
......@@ -134,7 +134,7 @@ void IndicatorHelper::systrayIconHook(QSystemTrayIcon &systray)
#else
void IndicatorHelper::systrayIconHook(KStatusNotifierItem &systray)
{
const QString iconPath = QStandardPaths::locate(QStandardPaths::AppDataLocation, QStringLiteral("icons"), QStandardPaths::LocateDirectory);
const QString iconPath = QStandardPaths::locate(QStandardPaths::AppDataLocation, QStringLiteral("kdeconnect-icons"), QStandardPaths::LocateDirectory);
if (!iconPath.isNull()) {
systray.setIconByName(QStringLiteral("kdeconnectindicatordark"));
} else {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment