PrefUI // Use faster tab animation settings.

This commit is contained in:
ShikiSuen 2022-08-25 23:29:19 +08:00
parent b403396003
commit e61d81bb12
1 changed files with 6 additions and 2 deletions

View File

@ -29,7 +29,11 @@ final class PreferencesTabViewController: NSViewController, PreferencesStyleCont
} }
override func loadView() { override func loadView() {
view = NSView() let newView = NSVisualEffectView()
newView.material = NSVisualEffectView.Material.sidebar
newView.blendingMode = NSVisualEffectView.BlendingMode.behindWindow
newView.state = NSVisualEffectView.State.active
view = newView
view.translatesAutoresizingMaskIntoConstraints = false view.translatesAutoresizingMaskIntoConstraints = false
} }
@ -135,7 +139,7 @@ final class PreferencesTabViewController: NSViewController, PreferencesStyleCont
// View controller animations only work on macOS 10.14 and newer. // View controller animations only work on macOS 10.14 and newer.
let options: NSViewController.TransitionOptions let options: NSViewController.TransitionOptions
if #available(macOS 10.14, *) { if #available(macOS 10.14, *) {
options = animated && isAnimated ? [.crossfade] : [] options = animated && isAnimated ? [.slideUp] : []
} else { } else {
options = [] options = []
} }