mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-10-30 15:07:49 -04:00
cc: stop avatar and app icon reloads from stalling the sheet, disable
edit fill in edit mode
fixes #3975
port 2.0
(cherry picked from commit d2792b8a11)
This commit is contained in:
1 parent
7a7f67bc24
commit
8aac4c767a
5 files changed
+25
-10
No files matched your search
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user