mirror of
https://github.com/morgan9e/macos-stats
synced 2026-04-14 00:04:15 +09:00
fix toggle button for 10.14
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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 = "";
|
||||
|
||||
@@ -158,6 +158,7 @@ class ApplicationSettings: NSView {
|
||||
button.action = action
|
||||
button.isBordered = false
|
||||
button.isTransparent = true
|
||||
button.target = self
|
||||
|
||||
toggle = button
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user