Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions quickshell/Modals/Clipboard/ClipboardContent.qml
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ Item {
onDeleteRequested: clipboardContent.modal.deleteEntry(modelData)
onPinRequested: clipboardContent.modal.pinEntry(modelData)
onUnpinRequested: clipboardContent.modal.unpinEntry(modelData)
onEditRequested: clipboardContent.modal.editEntry(modelData)
}
}

Expand Down Expand Up @@ -204,6 +205,7 @@ Item {
onDeleteRequested: clipboardContent.modal.deletePinnedEntry(modelData)
onPinRequested: clipboardContent.modal.pinEntry(modelData)
onUnpinRequested: clipboardContent.modal.unpinEntry(modelData)
onEditRequested: clipboardContent.modal.editEntry(modelData)
}
}

Expand Down
22 changes: 20 additions & 2 deletions quickshell/Modals/Clipboard/ClipboardEntry.qml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Rectangle {
signal deleteRequested
signal pinRequested
signal unpinRequested
signal editRequested

readonly property string entryType: modal ? modal.getEntryType(entry) : "text"
readonly property string entryPreview: modal ? modal.getEntryPreview(entry) : ""
Expand Down Expand Up @@ -70,6 +71,20 @@ Rectangle {
onClicked: entry.pinned ? unpinRequested() : pinRequested()
}

DankActionButton {
iconName: "edit"
iconSize: Theme.iconSize - 6
iconColor: Theme.surfaceText

onClicked: {
if (entryType === "image") {
// TODO - forward to editing software
} else {
editRequested();
}
}
}

DankActionButton {
iconName: "close"
iconSize: Theme.iconSize - 6
Expand Down Expand Up @@ -142,8 +157,11 @@ Rectangle {

MouseArea {
id: mouseArea
anchors.fill: parent
anchors.rightMargin: 80
anchors.left: parent.left
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

required for making all buttons clickable, otherwise the leftmost button was not operational

anchors.right: actionButtons.left
anchors.rightMargin: Theme.spacingS
anchors.top: parent.top
anchors.bottom: parent.bottom
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onPressed: mouse => {
Expand Down
Loading
Loading