- Restructure main window a bit more - Remove attempt at SF Symbols icons for now - Add Now Playing popout to Stacks style main window, tooltip instructs to click to select the current track in playlist - Disable libFLAC plugin on macOS 10.13 and newer, letting Core Audio handle it instead. Apparently, libFLAC is not really ready for Apple Silicon yet.
32 lines
746 B
Swift
32 lines
746 B
Swift
//
|
|
// PlaybackStatusToHiddenTransformer.swift
|
|
// Cog
|
|
//
|
|
// Created by Christopher Snowhill on 11/20/20.
|
|
//
|
|
|
|
import Foundation
|
|
|
|
class PlaybackStatusToHiddenTransformer : ValueTransformer {
|
|
override class func transformedValueClass() -> AnyClass {
|
|
return NSObject.self
|
|
}
|
|
|
|
override class func allowsReverseTransformation() -> Bool {
|
|
return false
|
|
}
|
|
|
|
override func transformedValue(_ value: Any?) -> Any? {
|
|
switch value {
|
|
case kCogStatusStopped as Int:
|
|
return true
|
|
case kCogStatusPaused as Int,
|
|
kCogStatusPlaying as Int:
|
|
return false
|
|
case .none:
|
|
return true
|
|
case .some(_):
|
|
return true
|
|
}
|
|
}
|
|
}
|