Add missing i18n to native macOS receiver selector and refactor

This commit is contained in:
hensm
2019-05-15 13:38:11 +01:00
parent 474dbad1aa
commit e368c4d09c
13 changed files with 155 additions and 108 deletions

View File

@@ -0,0 +1,19 @@
import Cocoa
func makeLabel(_ text: String,
size: CGFloat = 0,
color: NSColor = NSColor.textColor) -> NSTextField {
let textField = NSTextField()
textField.stringValue = text
textField.backgroundColor = .clear
textField.isEditable = false
textField.isBezeled = false
textField.sizeToFit()
// Text
textField.font = NSFont.systemFont(ofSize: size)
textField.textColor = color
return textField
}