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:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user