diff --git a/Modals/SpotlightModal.qml b/Modals/SpotlightModal.qml index 35d02e48..29339884 100644 --- a/Modals/SpotlightModal.qml +++ b/Modals/SpotlightModal.qml @@ -390,10 +390,7 @@ DankModal { id: listIconImg anchors.fill: parent - source: (model.icon) ? Quickshell.iconPath( - model.icon, - SettingsData.iconTheme === "System Default" ? "" : SettingsData.iconTheme) : "" - smooth: true + source: Quickshell.iconPath(model.icon, true) asynchronous: true visible: status === Image.Ready } @@ -584,9 +581,7 @@ DankModal { id: gridIconImg anchors.fill: parent - source: (model.icon) ? Quickshell.iconPath( - model.icon, - SettingsData.iconTheme === "System Default" ? "" : SettingsData.iconTheme) : "" + source: Quickshell.iconPath(model.icon, true) smooth: true asynchronous: true visible: status === Image.Ready diff --git a/Modules/AppDrawer/AppDrawerPopout.qml b/Modules/AppDrawer/AppDrawerPopout.qml index 5de34f85..91ffde0e 100644 --- a/Modules/AppDrawer/AppDrawerPopout.qml +++ b/Modules/AppDrawer/AppDrawerPopout.qml @@ -421,9 +421,7 @@ DankPopout { id: listIconImg anchors.fill: parent - source: (model.icon) ? Quickshell.iconPath( - model.icon, - SettingsData.iconTheme === "System Default" ? "" : SettingsData.iconTheme) : "" + source: Quickshell.iconPath(model.icon, true) smooth: true asynchronous: true visible: status === Image.Ready @@ -614,9 +612,7 @@ DankPopout { id: gridIconImg anchors.fill: parent - source: (model.icon) ? Quickshell.iconPath( - model.icon, - SettingsData.iconTheme === "System Default" ? "" : SettingsData.iconTheme) : "" + source: Quickshell.iconPath(model.icon, true) smooth: true asynchronous: true visible: status === Image.Ready diff --git a/Modules/Dock/DockAppButton.qml b/Modules/Dock/DockAppButton.qml index e9dc64be..dd17e37e 100644 --- a/Modules/Dock/DockAppButton.qml +++ b/Modules/Dock/DockAppButton.qml @@ -277,19 +277,7 @@ Item { anchors.centerIn: parent implicitSize: 40 - source: { - if (!appData || !appData.appId) - return "" - - var desktopEntry = DesktopEntries.byId(appData.appId) - if (desktopEntry && desktopEntry.icon) { - var iconPath = Quickshell.iconPath( - desktopEntry.icon, SettingsData.iconTheme - === "System Default" ? "" : SettingsData.iconTheme) - return iconPath - } - return "" - } + source: Quickshell.iconPath(DesktopEntries.byId(appData.appId).icon, true) mipmap: true smooth: true asynchronous: true diff --git a/Modules/Notifications/Center/NotificationCard.qml b/Modules/Notifications/Center/NotificationCard.qml index 43aa0228..1ae5a1d1 100644 --- a/Modules/Notifications/Center/NotificationCard.qml +++ b/Modules/Notifications/Center/NotificationCard.qml @@ -162,7 +162,7 @@ Rectangle { "http://") || appIcon.startsWith( "https://")) return appIcon - return Quickshell.iconPath(appIcon, "") + return Quickshell.iconPath(appIcon, true) } return "" } @@ -458,7 +458,7 @@ Rectangle { "https://")) return appIcon - return Quickshell.iconPath(appIcon, "") + return Quickshell.iconPath(appIcon, true) } return "" } diff --git a/Modules/Notifications/Popup/NotificationPopup.qml b/Modules/Notifications/Popup/NotificationPopup.qml index 1be4b350..45125ddf 100644 --- a/Modules/Notifications/Popup/NotificationPopup.qml +++ b/Modules/Notifications/Popup/NotificationPopup.qml @@ -261,7 +261,7 @@ PanelWindow { || appIcon.startsWith("https://")) return appIcon - return Quickshell.iconPath(appIcon, "") + return Quickshell.iconPath(appIcon, true) } return "" } diff --git a/Modules/Settings/ThemeColorsTab.qml b/Modules/Settings/ThemeColorsTab.qml index 66007221..e378949d 100644 --- a/Modules/Settings/ThemeColorsTab.qml +++ b/Modules/Settings/ThemeColorsTab.qml @@ -1,5 +1,6 @@ import QtQuick import QtQuick.Controls +import Quickshell import Quickshell.Io import qs.Common import qs.Modals @@ -754,7 +755,7 @@ Item { width: parent.width - Theme.iconSize - Theme.spacingXS anchors.verticalCenter: parent.verticalCenter text: "Icon Theme" - description: "DankShell & System Icons" + description: "DankShell & System Icons\n(requires restart)" currentValue: SettingsData.iconTheme enableFuzzySearch: true popupWidthOffset: 100 @@ -765,11 +766,11 @@ Item { } onValueChanged: value => { SettingsData.setIconTheme(value) - if (value !== "System Default" - && !SettingsData.qt5ctAvailable - && !SettingsData.qt6ctAvailable) - ToastService.showWarning( - "qt5ct or qt6ct not found - Qt app themes may not update without these tools") + if (Quickshell.env("QT_QPA_PLATFORMTHEME") != "gtk3" && + Quickshell.env("QT_QPA_PLATFORMTHEME") != "qt6ct" && + Quickshell.env("QT_QPA_PLATFORMTHEME_QT6") != "qt6ct") { + ToastService.showError("Missing Environment Variables", "You need to set either:\nQT_QPA_PLATFORMTHEME=gtk3 OR\nQT_QPA_PLATFORMTHEME=qt6ct\nas environment variables, and then restart the shell.\n\nqt6ct requires qt6ct-kde to be installed.") + } } } } diff --git a/Modules/TopBar/RunningApps.qml b/Modules/TopBar/RunningApps.qml index a8736f7b..e35461bf 100644 --- a/Modules/TopBar/RunningApps.qml +++ b/Modules/TopBar/RunningApps.qml @@ -116,20 +116,7 @@ Rectangle { anchors.verticalCenter: parent.verticalCenter width: 18 height: 18 - source: { - if (!appId) - return "" - - var desktopEntry = DesktopEntries.byId(appId) - if (desktopEntry && desktopEntry.icon) { - var iconPath = Quickshell.iconPath( - desktopEntry.icon, - SettingsData.iconTheme - === "System Default" ? "" : SettingsData.iconTheme) - return iconPath - } - return "" - } + source: Quickshell.iconPath(DesktopEntries.byId(appId).icon, true) smooth: true mipmap: true asynchronous: true diff --git a/Widgets/SystemLogo.qml b/Widgets/SystemLogo.qml index f8019444..c4d6ddcf 100644 --- a/Widgets/SystemLogo.qml +++ b/Widgets/SystemLogo.qml @@ -23,7 +23,7 @@ IconImage { stdout: StdioCollector { onStreamFinished: () => { root.source = Quickshell.iconPath( - this.text.trim()) + this.text.trim(), true) } } }