PrefUI // Use faster tab animation settings.
This commit is contained in:
parent
b403396003
commit
e61d81bb12
|
@ -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 = []
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue