Add delete to the selection bar and drop the in-header close button
The selection bar covered copying but not the other action people reach for with a selection. The header also carried a second close button next to the window's own traffic light, so it was removed in favor of that.
This commit is contained in:
@@ -83,9 +83,6 @@ struct PanelView: View {
|
||||
.buttonStyle(.plain).foregroundStyle(.secondary).help("Search (Cmd+F)")
|
||||
Button { addPhotos() } label: { Image(systemName: "photo.on.rectangle.angled") }
|
||||
.buttonStyle(.plain).foregroundStyle(.secondary).help("Add photos")
|
||||
Button { PanelController.shared.hide() } label: { Image(systemName: "xmark") }
|
||||
.buttonStyle(.plain).foregroundStyle(.secondary)
|
||||
.help("Hide the panel (Cmd+W) — Prompt keeps running so Shift-Shift capture still works. Quit from the menu bar icon or Cmd+Q.")
|
||||
}
|
||||
.padding(.horizontal, 12)
|
||||
.padding(.vertical, 10)
|
||||
@@ -576,6 +573,12 @@ struct PanelView: View {
|
||||
.font(.caption)
|
||||
.buttonStyle(.plain)
|
||||
.foregroundStyle(Color.accentColor)
|
||||
Button { deleteSelection() } label: {
|
||||
Image(systemName: "trash")
|
||||
}
|
||||
.buttonStyle(.plain)
|
||||
.foregroundStyle(.red)
|
||||
.help("Delete selected")
|
||||
Button { clearSelection() } label: {
|
||||
Image(systemName: "xmark.circle.fill")
|
||||
}
|
||||
@@ -588,6 +591,12 @@ struct PanelView: View {
|
||||
.background(Color.accentColor.opacity(0.12))
|
||||
}
|
||||
|
||||
private func deleteSelection() {
|
||||
guard !selection.isEmpty else { return }
|
||||
store.delete(ids: selection)
|
||||
clearSelection()
|
||||
}
|
||||
|
||||
private func copySelection(asList: Bool) {
|
||||
guard !selection.isEmpty else { return }
|
||||
if asList {
|
||||
|
||||
Reference in New Issue
Block a user