diff --git a/Commons/Icons.qml b/Commons/AppIcons.qml similarity index 99% rename from Commons/Icons.qml rename to Commons/AppIcons.qml index 80c89c7..2a9aee1 100644 --- a/Commons/Icons.qml +++ b/Commons/AppIcons.qml @@ -5,7 +5,7 @@ import Quickshell import qs.Services Singleton { - id: icons + id: root function iconFromName(iconName, fallbackName) { const fallback = fallbackName || "application-x-executable" diff --git a/Modules/Bar/Widgets/ActiveWindow.qml b/Modules/Bar/Widgets/ActiveWindow.qml index 473bdfe..ed657b3 100644 --- a/Modules/Bar/Widgets/ActiveWindow.qml +++ b/Modules/Bar/Widgets/ActiveWindow.qml @@ -51,7 +51,7 @@ RowLayout { if (focusedWindow && focusedWindow.appId) { const idValue = focusedWindow.appId const normalizedId = (typeof idValue === 'string') ? idValue : String(idValue) - return Icons.iconForAppId(normalizedId.toLowerCase()) + return AppIcons.iconForAppId(normalizedId.toLowerCase()) } // Fallback to ToplevelManager @@ -60,7 +60,7 @@ RowLayout { if (activeToplevel.appId) { const idValue2 = activeToplevel.appId const normalizedId2 = (typeof idValue2 === 'string') ? idValue2 : String(idValue2) - return Icons.iconForAppId(normalizedId2.toLowerCase()) + return AppIcons.iconForAppId(normalizedId2.toLowerCase()) } } diff --git a/Modules/Bar/Widgets/Taskbar.qml b/Modules/Bar/Widgets/Taskbar.qml index 103e707..3c570ec 100644 --- a/Modules/Bar/Widgets/Taskbar.qml +++ b/Modules/Bar/Widgets/Taskbar.qml @@ -56,7 +56,7 @@ Rectangle { anchors.centerIn: parent width: Style.marginL * root.scaling height: Style.marginL * root.scaling - source: Icons.iconForAppId(taskbarItem.modelData.appId) + source: AppIcons.iconForAppId(taskbarItem.modelData.appId) smooth: true } } diff --git a/Modules/Dock/Dock.qml b/Modules/Dock/Dock.qml index 04d64f7..faabbd9 100644 --- a/Modules/Dock/Dock.qml +++ b/Modules/Dock/Dock.qml @@ -197,7 +197,7 @@ Variants { function getAppIcon(toplevel: Toplevel): string { if (!toplevel) return "" - return Icons.iconForAppId(toplevel.appId?.toLowerCase()) + return AppIcons.iconForAppId(toplevel.appId?.toLowerCase()) } RowLayout { diff --git a/Modules/Launcher/Launcher.qml b/Modules/Launcher/Launcher.qml index 0ad25da..a309913 100644 --- a/Modules/Launcher/Launcher.qml +++ b/Modules/Launcher/Launcher.qml @@ -404,7 +404,7 @@ NPanel { sourceComponent: Component { IconImage { anchors.fill: parent - source: modelData.icon ? Icons.iconFromName(modelData.icon, "application-x-executable") : "" + source: modelData.icon ? AppIcons.iconFromName(modelData.icon, "application-x-executable") : "" visible: modelData.icon && source !== "" asynchronous: true } diff --git a/Services/NotificationService.qml b/Services/NotificationService.qml index 53d20f3..69fc80f 100644 --- a/Services/NotificationService.qml +++ b/Services/NotificationService.qml @@ -201,7 +201,7 @@ Singleton { // Resolve themed icon names to absolute paths try { - const p = Icons.iconFromName(icon, "") + const p = AppIcons.iconFromName(icon, "") return p || "" } catch (e2) { return ""