mirror of
https://github.com/FBukovina/Atoll.git
synced 2026-10-27 23:24:32 +00:00
Fully working Widget
This commit is contained in:
parent
b77de94b62
commit
979abf4f20
2 changed files with 46 additions and 20 deletions
|
|
@ -9,6 +9,7 @@ import SwiftUI
|
|||
import AppKit
|
||||
import SkyLightWindow
|
||||
import Defaults
|
||||
import QuartzCore
|
||||
|
||||
@MainActor
|
||||
class LockScreenPanelManager {
|
||||
|
|
@ -102,7 +103,11 @@ class LockScreenPanelManager {
|
|||
let targetFrame = NSRect(x: originX, y: originY, width: targetWidth, height: targetHeight)
|
||||
|
||||
if animated {
|
||||
window.animator().setFrame(targetFrame, display: true)
|
||||
NSAnimationContext.runAnimationGroup { context in
|
||||
context.duration = 0.45
|
||||
context.timingFunction = CAMediaTimingFunction(name: .easeInEaseOut)
|
||||
window.animator().setFrame(targetFrame, display: true)
|
||||
}
|
||||
} else {
|
||||
window.setFrame(targetFrame, display: true)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue