Renamed Icons.qml to AppIcons.qml for clarity

This commit is contained in:
LemmyCook 2025-09-09 14:16:37 -04:00
parent 4f731b67d1
commit b1f9609cd3
6 changed files with 7 additions and 7 deletions

View file

@ -5,7 +5,7 @@ import Quickshell
import qs.Services
Singleton {
id: icons
id: root
function iconFromName(iconName, fallbackName) {
const fallback = fallbackName || "application-x-executable"

View file

@ -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())
}
}

View file

@ -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
}
}

View file

@ -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 {

View file

@ -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
}

View file

@ -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 ""