fix: checkboxes not showing properly on macos 10.13 (see #507)

This commit is contained in:
Louis Pontoise authored and lwouis committed 2020-08-12 01:18:52 +09:00
1 parent 2fa0b8ac52
commit 43a9cb1644
1 file changed
+1 -1
@@ -16,7 +16,7 @@ class LabelAndControl: NSObject {
}
static func makeLabelWithCheckbox(_ labelText: String, _ rawName: String, extraAction: ActionClosure? = nil, labelPosition: LabelPosition = .leftWithSeparator) -> [NSView] {
let checkbox = NSButton(checkboxWithTitle: labelPosition == .right ? labelText : "", target: nil, action: nil)
let checkbox = NSButton(checkboxWithTitle: labelPosition == .right ? labelText : " ", target: nil, action: nil)
checkbox.translatesAutoresizingMaskIntoConstraints = false
checkbox.state = (Preferences.getString(rawName)! as NSString).boolValue ? .on : .off
let views = makeLabelWithProvidedControl(labelText, rawName, checkbox, labelPosition: labelPosition, extraAction: extraAction)