1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-06-16 16:15:23 -04:00

fix(clipboard): hide pin action while keeping saved indicator (#2626)

This commit is contained in:
jbwfu
2026-06-13 03:39:23 +08:00
committed by GitHub
parent 1c0245f2db
commit b34a04f723
+11 -14
View File
@@ -28,7 +28,7 @@ Rectangle {
readonly property bool showPinAction: visibleEntryActions.includes("pin") readonly property bool showPinAction: visibleEntryActions.includes("pin")
readonly property bool showEditAction: visibleEntryActions.includes("edit") readonly property bool showEditAction: visibleEntryActions.includes("edit")
readonly property bool showDeleteAction: visibleEntryActions.includes("delete") readonly property bool showDeleteAction: visibleEntryActions.includes("delete")
readonly property bool showPinnedIndicator: !showPinAction && effectivePinned readonly property bool showPinnedIndicator: hasPinnedDuplicate && !showPinAction
readonly property bool showAnyAction: showPinAction || showEditAction || showDeleteAction || showPinnedIndicator readonly property bool showAnyAction: showPinAction || showEditAction || showDeleteAction || showPinnedIndicator
radius: Theme.cornerRadius radius: Theme.cornerRadius
@@ -72,20 +72,17 @@ Rectangle {
spacing: Theme.spacingXS spacing: Theme.spacingXS
visible: root.showAnyAction visible: root.showAnyAction
DankActionButton { Item {
iconName: "push_pin" width: 40
iconSize: Theme.iconSize - 6 height: 40
iconColor: Theme.primary
backgroundColor: Theme.primarySelected
visible: root.showPinnedIndicator visible: root.showPinnedIndicator
onClicked: {
if (entry.pinned) { // Status indicator only; the Pin action remains hidden.
unpinRequested(entry); DankIcon {
return; anchors.centerIn: parent
} name: "push_pin"
if (pinnedDuplicateEntry) { size: Theme.iconSize - 6
unpinRequested(pinnedDuplicateEntry); color: Theme.primary
}
} }
} }