cc: stop avatar and app icon reloads from stalling the sheet, disable

edit fill in edit mode

fixes #3975
port 2.0
This commit is contained in:
bbedward committed 2026-10-28 11:48:41 -04:00
1 parent af9876d232
commit d2792b8a11
5 files changed
+25 -10

No files matched your search

Generated
+3 -3
View File
@@ -3,11 +3,11 @@
"dank-qml-common": {
"flake": false,
"locked": {
"lastModified": 1793196272,
"narHash": "sha256-8VEk98MAdvx6ggVXsa8w/b3MQd5d5zxS+U/13eeJFjw=",
"lastModified": 1793202447,
"narHash": "sha256-vA215yUKc662r8pGclsS15Iq3ZX8OjwMIqO0pMpLAoM=",
"owner": "duxlabs-dev",
"repo": "dux-qml-common",
"rev": "f2f77d3353ef4b40a0dca0160e1779ca55aad572",
"rev": "ee87ee32d093fb1e177791dc6b3894c8951d1def",
"type": "github"
},
"original": {
@@ -108,11 +108,13 @@ DBottomSheet {
visible: item.modelData.id !== "user" || PortalService.profileImageUrl === ""
}
DCircularImage {
Loader {
anchors.fill: parent
imageSource: PortalService.profileImageUrl
fallbackIcon: "material:person"
visible: item.modelData.id === "user" && PortalService.profileImageUrl !== ""
active: item.modelData.id === "user" && PortalService.profileImageUrl !== ""
sourceComponent: DCircularImage {
imageSource: PortalService.profileImageUrl
fallbackIcon: "material:person"
}
}
FocusRing {
@@ -9,7 +9,6 @@ CcTile {
readonly property bool finishing: action === "edit" && (host?.editMode ?? false)
toggle: false
active: finishing
tooltips: !finishing
iconName: finishing ? "check" : widgetDef?.icon ?? ""
title: widgetDef?.text ?? ""
@@ -2,6 +2,7 @@ import QtQuick
import Quickshell
import Quickshell.Widgets
import qs.Common
import qs.DCommon.Common as DCommon
import qs.DCommon.Widgets
Item {
@@ -9,18 +10,31 @@ Item {
property string appId: ""
property real iconSize: Theme.iconSize
readonly property int iconRequestSize: DCommon.Style.iconRasterSize(iconSize)
implicitWidth: iconSize
implicitHeight: iconSize
IconImage {
id: image
property string paintedFor: ""
readonly property bool holdsCurrentIcon: paintedFor !== "" && paintedFor === root.appId
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)) : ""
backer.sourceSize: Qt.size(root.iconRequestSize, root.iconRequestSize)
backer.retainWhileLoading: true
smooth: true
mipmap: true
asynchronous: true
visible: status === Image.Ready
visible: showsFrame
onStatusChanged: {
if (status !== Image.Ready)
return;
paintedFor = root.appId;
}
}
DIcon {