mirror of
https://github.com/hensm/fx_cast.git
synced 2026-06-11 10:09:59 +00:00
Add missing i18n to native macOS receiver selector and refactor
This commit is contained in:
19
app/NativeMacReceiverSelector/util.swift
Normal file
19
app/NativeMacReceiverSelector/util.swift
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user