mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
Renamed Icons.qml to AppIcons.qml for clarity
This commit is contained in:
@@ -5,7 +5,7 @@ import Quickshell
|
||||
import qs.Services
|
||||
|
||||
Singleton {
|
||||
id: icons
|
||||
id: root
|
||||
|
||||
function iconFromName(iconName, fallbackName) {
|
||||
const fallback = fallbackName || "application-x-executable"
|
||||
@@ -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())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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 ""
|
||||
|
||||
Reference in New Issue
Block a user