fix toggle button for 10.14

This commit is contained in:
Serhiy Mytrovtsiy
2020-06-18 11:16:08 +02:00
parent d7ec2b77eb
commit b22c74196b
4 changed files with 7 additions and 4 deletions

View File

@@ -152,13 +152,14 @@ open class Settings: NSView, Settings_p {
toggle = switchButton
} else {
let button: NSButton = NSButton(frame: NSRect(x: self.frame.width-55, y: 0, width: 30, height: view.frame.height))
let button: NSButton = NSButton(frame: NSRect(x: self.frame.width-30, y: 0, width: 15, height: view.frame.height))
button.setButtonType(.switch)
button.state = state ? .on : .off
button.title = ""
button.action = #selector(self.toggleEnable)
button.isBordered = false
button.isTransparent = true
button.target = self
toggle = button
}

View File

@@ -1515,7 +1515,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.14;
MARKETING_VERSION = 2.0.4;
MARKETING_VERSION = 2.0.5;
PRODUCT_BUNDLE_IDENTIFIER = eu.exelban.Stats;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -1547,7 +1547,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.14;
MARKETING_VERSION = 2.0.4;
MARKETING_VERSION = 2.0.5;
PRODUCT_BUNDLE_IDENTIFIER = eu.exelban.Stats;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";

View File

@@ -158,6 +158,7 @@ class ApplicationSettings: NSView {
button.action = action
button.isBordered = false
button.isTransparent = true
button.target = self
toggle = button
}

View File

@@ -298,10 +298,11 @@ public extension NSView {
button.action = action
button.isBordered = false
button.isTransparent = true
button.target = self
toggle = button
}
row.addSubview(toggle)
row.addSubview(rowTitle)