Skip to content

Commit

Permalink
fix toggle button for 10.14
Browse files Browse the repository at this point in the history
  • Loading branch information
exelban committed Jun 18, 2020
1 parent d7ec2b7 commit b22c741
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion ModuleKit/settings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
4 changes: 2 additions & 2 deletions Stats.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "";
Expand Down Expand Up @@ -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 = "";
Expand Down
1 change: 1 addition & 0 deletions Stats/Views/AppSettings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ class ApplicationSettings: NSView {
button.action = action
button.isBordered = false
button.isTransparent = true
button.target = self

toggle = button
}
Expand Down
3 changes: 2 additions & 1 deletion StatsKit/extensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit b22c741

Please sign in to comment.