NotifierUI // Enable Windows Aero Glass FX.
This commit is contained in:
parent
88c5e5e41e
commit
ebb86e3506
|
@ -101,9 +101,14 @@ public class NotifierController: NSWindowController, NotifierWindowDelegate {
|
|||
windowRect.origin.y = screenRect.maxY - windowRect.height - 10
|
||||
let styleMask: NSWindow.StyleMask = [.fullSizeContentView, .titled]
|
||||
|
||||
|
||||
let transparentVisualEffect = NSVisualEffectView()
|
||||
transparentVisualEffect.blendingMode = .behindWindow
|
||||
transparentVisualEffect.state = .active
|
||||
transparentVisualEffect.material = .dark
|
||||
|
||||
let panel = NotifierWindow(contentRect: windowRect, styleMask: styleMask, backing: .buffered, defer: false)
|
||||
panel.contentView = transparentVisualEffect
|
||||
panel.isMovableByWindowBackground = true
|
||||
panel.level = NSWindow.Level(Int(kCGPopUpMenuWindowLevel))
|
||||
panel.hasShadow = true
|
||||
panel.backgroundColor = backgroundColor
|
||||
|
|
Loading…
Reference in New Issue