|
|
@ -5,40 +5,40 @@ import QuartzCore |
|
|
|
|
|
|
|
|
|
|
|
class NoTimezoneView: NSView { |
|
|
|
class NoTimezoneView: NSView { |
|
|
|
private lazy var emoji: NSTextField = { |
|
|
|
private lazy var emoji: NSTextField = { |
|
|
|
let l = NSTextField(frame: NSRect(x: frame.size.width / 2 - 50, |
|
|
|
let emoji = NSTextField(frame: NSRect(x: frame.size.width / 2 - 50, |
|
|
|
y: frame.size.height / 2 - 50, |
|
|
|
y: frame.size.height / 2 - 50, |
|
|
|
width: 100, |
|
|
|
width: 100, |
|
|
|
height: 100)) |
|
|
|
height: 100)) |
|
|
|
l.wantsLayer = true |
|
|
|
emoji.wantsLayer = true |
|
|
|
l.stringValue = "🌏" |
|
|
|
emoji.stringValue = "🌏" |
|
|
|
l.isBordered = false |
|
|
|
emoji.isBordered = false |
|
|
|
l.isEditable = false |
|
|
|
emoji.isEditable = false |
|
|
|
l.focusRingType = .none |
|
|
|
emoji.focusRingType = .none |
|
|
|
l.alignment = .center |
|
|
|
emoji.alignment = .center |
|
|
|
l.font = NSFont.systemFont(ofSize: 80) |
|
|
|
emoji.font = NSFont.systemFont(ofSize: 80) |
|
|
|
l.backgroundColor = .clear |
|
|
|
emoji.backgroundColor = .clear |
|
|
|
l.setAccessibilityIdentifier("NoTimezoneEmoji") |
|
|
|
emoji.setAccessibilityIdentifier("NoTimezoneEmoji") |
|
|
|
return l |
|
|
|
return emoji |
|
|
|
}() |
|
|
|
}() |
|
|
|
|
|
|
|
|
|
|
|
private lazy var message: NSTextField = { |
|
|
|
private lazy var message: NSTextField = { |
|
|
|
let m = NSTextField(frame: NSRect(x: frame.size.width / 2 - 250, |
|
|
|
let messageField = NSTextField(frame: NSRect(x: frame.size.width / 2 - 250, |
|
|
|
y: frame.size.height / 2 - 275, |
|
|
|
y: frame.size.height / 2 - 275, |
|
|
|
width: 500, |
|
|
|
width: 500, |
|
|
|
height: 200)) |
|
|
|
height: 200)) |
|
|
|
m.wantsLayer = true |
|
|
|
messageField.wantsLayer = true |
|
|
|
m.setAccessibilityIdentifier("NoTimezoneMessage") |
|
|
|
messageField.setAccessibilityIdentifier("NoTimezoneMessage") |
|
|
|
m.placeholderString = "No places added" |
|
|
|
messageField.placeholderString = "No places added" |
|
|
|
m.stringValue = "No places added" |
|
|
|
messageField.stringValue = "No places added" |
|
|
|
m.isBordered = false |
|
|
|
messageField.isBordered = false |
|
|
|
m.isEditable = false |
|
|
|
messageField.isEditable = false |
|
|
|
m.maximumNumberOfLines = 2 |
|
|
|
messageField.maximumNumberOfLines = 2 |
|
|
|
m.focusRingType = .none |
|
|
|
messageField.focusRingType = .none |
|
|
|
m.alignment = .center |
|
|
|
messageField.alignment = .center |
|
|
|
m.font = NSFont(name: "Avenir", size: 24) |
|
|
|
messageField.font = NSFont(name: "Avenir", size: 24) |
|
|
|
m.backgroundColor = .clear |
|
|
|
messageField.backgroundColor = .clear |
|
|
|
m.textColor = .darkGray |
|
|
|
messageField.textColor = .darkGray |
|
|
|
return m |
|
|
|
return messageField |
|
|
|
}() |
|
|
|
}() |
|
|
|
|
|
|
|
|
|
|
|
override func layout() { |
|
|
|
override func layout() { |
|
|
|