Browse Source

Distinguish between one / double click.

pull/113/head
Abhishek Banthia 3 years ago
parent
commit
8335d1c4d3
  1. 6
      Clocker/Panel/UI/TimezoneCellView.swift

6
Clocker/Panel/UI/TimezoneCellView.swift

@ -198,7 +198,8 @@ class TimezoneCellView: NSTableCellView {
Logger.log(object: nil, for: "Open Extra Options")
}
override func mouseDown(with _: NSEvent) {
override func mouseDown(with event: NSEvent) {
if (event.clickCount == 1) {
// Text is copied in the following format: Chicago - 1625185925
let clipboardCopy = "\(customName.stringValue) - \(time.stringValue)"
let pasteboard = NSPasteboard.general
@ -208,6 +209,9 @@ class TimezoneCellView: NSTableCellView {
window?.contentView?.makeToast("Copied to Clipboard".localized())
window?.endEditing(for: nil)
} else if (event.clickCount == 2) {
//TODO: Favourite this timezone
}
}
override func rightMouseDown(with event: NSEvent) {

Loading…
Cancel
Save