feat: animate queue sidebar expansion and collapse
This commit is contained in:
@@ -299,10 +299,12 @@ struct SystemPlaybackChecks {
|
||||
model.attachWindow(window)
|
||||
let videoFrame = window.frame
|
||||
model.showsQueue = true
|
||||
until("queue opening settles") { !model.isQueueTransitioning }
|
||||
require(abs(window.frame.width - videoFrame.width - 260) < 0.01 &&
|
||||
abs(window.frame.height - videoFrame.height) < 0.01,
|
||||
"opening queue grows window without shrinking video")
|
||||
model.showsQueue = false
|
||||
until("queue closing settles") { !model.isQueueTransitioning }
|
||||
require(abs(window.frame.width - videoFrame.width) < 0.01 &&
|
||||
abs(window.frame.height - videoFrame.height) < 0.01,
|
||||
"closing queue restores video-only window size")
|
||||
@@ -327,6 +329,7 @@ struct SystemPlaybackChecks {
|
||||
}
|
||||
until("open starts authoritative playback") { model.canTogglePlayback && model.state.status == PLAYER_PLAYING }
|
||||
model.showsQueue = true
|
||||
until("queue opens before live resize") { !model.isQueueTransitioning }
|
||||
for delta in [NSSize(width: 160, height: 0), NSSize(width: 0, height: 90),
|
||||
NSSize(width: -100, height: 0), NSSize(width: 0, height: -60)] {
|
||||
let proposal = NSSize(width: window.frame.width + delta.width, height: window.frame.height + delta.height)
|
||||
@@ -343,6 +346,7 @@ struct SystemPlaybackChecks {
|
||||
"aspect-locked queue window follows the dragged axis")
|
||||
}
|
||||
model.showsQueue = false
|
||||
until("queue closes after live resize") { !model.isQueueTransitioning }
|
||||
require(center.playbackState == .playing, "playing publishes macOS playback ownership")
|
||||
requirePlaybackPower(system: true, display: true, "local video keeps the Mac and display awake")
|
||||
var bufferingState = model.state
|
||||
|
||||
Reference in New Issue
Block a user