diff --git a/dux-qml-common b/dux-qml-common index 604ba61ee..43e05926f 160000 --- a/dux-qml-common +++ b/dux-qml-common @@ -1 +1 @@ -Subproject commit 604ba61ee559f5f6c6dc7e78f9fb8e004a54e686 +Subproject commit 43e05926fcdacc53675623169bcef686faa95301 diff --git a/flake.lock b/flake.lock index 157dd8c32..6b9a70dc7 100644 --- a/flake.lock +++ b/flake.lock @@ -3,11 +3,11 @@ "dank-qml-common": { "flake": false, "locked": { - "lastModified": 1793330030, - "narHash": "sha256-AOQTOSVGHmTkFGN8b9omNg5uKZE+RwIcvtkvEBxEJeU=", + "lastModified": 1793369095, + "narHash": "sha256-fmUYL5zhf+DdNxgVY5y7s+cRF2YySt2rceXKzoVdmUg=", "owner": "duxlabs-dev", "repo": "dux-qml-common", - "rev": "604ba61ee559f5f6c6dc7e78f9fb8e004a54e686", + "rev": "43e05926fcdacc53675623169bcef686faa95301", "type": "github" }, "original": { diff --git a/quickshell/Modules/ControlCenter/Details/RunningAppsDetail.qml b/quickshell/Modules/ControlCenter/Details/RunningAppsDetail.qml index 8bf20191f..ce2747e81 100644 --- a/quickshell/Modules/ControlCenter/Details/RunningAppsDetail.qml +++ b/quickshell/Modules/ControlCenter/Details/RunningAppsDetail.qml @@ -19,6 +19,7 @@ Item { readonly property string title: I18n.tr("Running apps") property var toplevels: [] readonly property int count: toplevels.length + property int _desktopEntriesRevision: 0 signal closeRequested signal dismissRequested @@ -28,6 +29,14 @@ Item { dismissRequested(); } + Connections { + target: DesktopEntries + + function onApplicationsChanged() { + root._desktopEntriesRevision++; + } + } + DFlickable { anchors.fill: parent contentHeight: column.height @@ -50,7 +59,10 @@ Item { required property var modelData readonly property string appId: modelData?.appId ?? "" - readonly property string appName: Paths.getAppName(appId, DesktopEntries.heuristicLookup(appId)) + readonly property string appName: { + root._desktopEntriesRevision; + return Paths.getAppName(appId, DesktopEntries.heuristicLookup(appId)); + } readonly property var placement: CompositorService.toplevelPlacement(modelData) readonly property string workspaceLabel: placement.workspace ? I18n.tr("Workspace %1", "control center running app row, %1 is a workspace number or name").arg(placement.workspace) : "" readonly property string outputLabel: Quickshell.screens.length > 1 ? (SettingsData.getScreenDisplayName(Quickshell.screens.find(screen => screen.name === placement.output)) || placement.output) : "" diff --git a/quickshell/Modules/ControlCenter/Widgets/CcAppIcon.qml b/quickshell/Modules/ControlCenter/Widgets/CcAppIcon.qml index 632236806..e764c2302 100644 --- a/quickshell/Modules/ControlCenter/Widgets/CcAppIcon.qml +++ b/quickshell/Modules/ControlCenter/Widgets/CcAppIcon.qml @@ -11,10 +11,19 @@ Item { property string appId: "" property real iconSize: Theme.iconSize readonly property int iconRequestSize: DCommon.Style.iconRasterSize(iconSize) + property int _desktopEntriesRevision: 0 implicitWidth: iconSize implicitHeight: iconSize + Connections { + target: DesktopEntries + + function onApplicationsChanged() { + root._desktopEntriesRevision++; + } + } + IconImage { id: image @@ -23,7 +32,10 @@ Item { readonly property bool showsFrame: status === Image.Ready || (holdsCurrentIcon && status === Image.Loading) anchors.fill: parent - source: root.appId ? Paths.getAppIcon(root.appId, DesktopEntries.heuristicLookup(root.appId)) : "" + source: { + root._desktopEntriesRevision; + return root.appId ? Paths.getAppIcon(root.appId, DesktopEntries.heuristicLookup(root.appId)) : ""; + } backer.sourceSize: Qt.size(root.iconRequestSize, root.iconRequestSize) backer.retainWhileLoading: true smooth: true