fix: align queue header and window controls
This commit is contained in:
+16
-18
@@ -2043,6 +2043,15 @@ private struct PlayerContent: View {
|
||||
.frame(height: 24)
|
||||
.background(PlayerGlass(cornerRadius: 8).clipShape(RoundedRectangle(cornerRadius: 8)).allowsHitTesting(false))
|
||||
Spacer(minLength: 12)
|
||||
if model.showsQueue {
|
||||
HStack(spacing: 4) {
|
||||
Text("Queue").fontWeight(.semibold)
|
||||
Text("\(model.queue.items.count)").foregroundStyle(.secondary)
|
||||
}
|
||||
.font(.system(size: 13))
|
||||
.padding(.trailing, 8)
|
||||
.accessibilityElement(children: .combine)
|
||||
}
|
||||
titleControls
|
||||
}
|
||||
.padding(.leading, model.isFullScreen ? 16 : 86)
|
||||
@@ -2240,17 +2249,6 @@ private struct PlayerContent: View {
|
||||
|
||||
private var queueSidebar: some View {
|
||||
VStack(spacing: 0) {
|
||||
HStack {
|
||||
Text("Queue").font(.headline)
|
||||
Text("\(model.queue.items.count)").foregroundStyle(.secondary)
|
||||
Spacer()
|
||||
Button { model.showsQueue = false } label: {
|
||||
Image(systemName: "sidebar.right")
|
||||
}
|
||||
.help("Hide Queue")
|
||||
.accessibilityLabel("Hide Queue")
|
||||
}
|
||||
.padding(12)
|
||||
HStack {
|
||||
iconButton("backward.end.fill", "Previous Queue Item") { model.advanceQueue(-1) }
|
||||
.disabled(!model.canPreviousQueueItem)
|
||||
@@ -2266,6 +2264,7 @@ private struct PlayerContent: View {
|
||||
HStack(spacing: 8) {
|
||||
Image(systemName: item.id == model.queue.currentID ? "play.fill" : "film")
|
||||
.foregroundStyle(item.id == model.queue.currentID ? Color.accentColor : .secondary)
|
||||
.frame(width: 20, alignment: .center)
|
||||
.accessibilityLabel(item.id == model.queue.currentID ? "Current item" : "Queued item")
|
||||
Text(item.url.lastPathComponent)
|
||||
.lineLimit(2)
|
||||
@@ -2328,6 +2327,12 @@ private struct PlayerContent: View {
|
||||
queueSidebar
|
||||
}
|
||||
}
|
||||
.overlay(alignment: .top) {
|
||||
titlebar
|
||||
.opacity(model.isCompact || model.compactWindow.isTransitioning ? 0 : 1)
|
||||
.allowsHitTesting(!model.isCompact && !model.compactWindow.isTransitioning && model.controlsVisible)
|
||||
.accessibilityHidden(model.isCompact || model.compactWindow.isTransitioning || !model.controlsVisible)
|
||||
}
|
||||
.frame(minWidth: model.isCompact || model.compactWindow.isTransitioning ? 160 : (model.showsQueue ? 660 : 400),
|
||||
minHeight: model.isCompact || model.compactWindow.isTransitioning ? model.compactContentMinimumHeight : 240)
|
||||
.ignoresSafeArea()
|
||||
@@ -2549,13 +2554,6 @@ private struct PlayerContent: View {
|
||||
.allowsHitTesting(model.isCompact)
|
||||
.accessibilityHidden(!model.isCompact)
|
||||
|
||||
titlebar
|
||||
.frame(width: geometry.size.width)
|
||||
.animation(compactChromeAnimation) { content in
|
||||
content.opacity(model.isCompact ? 0 : 1)
|
||||
}
|
||||
.allowsHitTesting(!model.isCompact && model.controlsVisible)
|
||||
.accessibilityHidden(model.isCompact || !model.controlsVisible)
|
||||
|
||||
if model.canTogglePlayback {
|
||||
playbackControls
|
||||
|
||||
Reference in New Issue
Block a user