1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-06-14 23:25: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 showEditAction: visibleEntryActions.includes("edit")
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
radius: Theme.cornerRadius
@@ -72,20 +72,17 @@ Rectangle {
spacing: Theme.spacingXS
visible: root.showAnyAction
DankActionButton {
iconName: "push_pin"
iconSize: Theme.iconSize - 6
iconColor: Theme.primary
backgroundColor: Theme.primarySelected
Item {
width: 40
height: 40
visible: root.showPinnedIndicator
onClicked: {
if (entry.pinned) {
unpinRequested(entry);
return;
}
if (pinnedDuplicateEntry) {
unpinRequested(pinnedDuplicateEntry);
}
// Status indicator only; the Pin action remains hidden.
DankIcon {
anchors.centerIn: parent
name: "push_pin"
size: Theme.iconSize - 6
color: Theme.primary
}
}