mirror of
https://github.com/morgan9e/macos-stats
synced 2026-04-14 00:04:15 +09:00
fix: fixed toggle buttons visibility in the settings when they must be disabled
This commit is contained in:
@@ -316,13 +316,13 @@ public extension Array where Element: Hashable {
|
||||
}
|
||||
|
||||
public func findAndToggleNSControlState(_ view: NSView?, state: NSControl.StateValue) {
|
||||
if let control = view?.subviews.first(where: { $0 is NSControl }) {
|
||||
if let control = view?.subviews.first(where: { $0 is NSControl && !($0 is NSTextField) }) {
|
||||
toggleNSControlState(control as? NSControl, state: state)
|
||||
}
|
||||
}
|
||||
|
||||
public func findAndToggleEnableNSControlState(_ view: NSView?, state: Bool) {
|
||||
if let control = view?.subviews.first(where: { $0 is NSControl }) {
|
||||
if let control = view?.subviews.first(where: { $0 is NSControl && !($0 is NSTextField) }) {
|
||||
toggleEnableNSControlState(control as? NSControl, state: state)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user