fix: restore sidebar header and balance footer sizing

This commit is contained in:
2026-10-18 19:37:22 +02:00
parent 09d659d2cc
commit 4ca6e80cb0
3 changed files with 41 additions and 14 deletions
+12 -12
View File
@@ -2052,9 +2052,9 @@ private struct PlayerContent: View {
: String(format: "%02d:%02d", value / 60, value % 60)
}
private func iconButton(_ symbol: String, _ label: String, action: @escaping () -> Void) -> some View {
private func iconButton(_ symbol: String, _ label: String, size: CGFloat = 17, action: @escaping () -> Void) -> some View {
Button(action: action) {
Image(systemName: symbol).font(.system(size: 17)).frame(width: 24, height: 24)
Image(systemName: symbol).font(.system(size: size)).frame(width: 24, height: 24)
}
.buttonStyle(.plain)
.help(label)
@@ -2286,13 +2286,7 @@ private struct PlayerContent: View {
private var queueSidebar: some View {
VStack(spacing: 0) {
HStack(spacing: 4) {
Spacer(minLength: 4)
titleControls
}
.padding(.leading, 12)
.padding(.trailing, 4)
.frame(height: 32)
Color.clear.frame(height: 32)
List {
ForEach(model.queue.items) { item in
HStack(spacing: 8) {
@@ -2349,10 +2343,11 @@ private struct PlayerContent: View {
Text("Queue").fontWeight(.semibold)
Text("\(model.queue.items.count)").foregroundStyle(.secondary)
}
.font(.system(size: 13))
.font(.system(size: 15))
.accessibilityElement(children: .combine)
Button(action: model.addQueuePanel) {
Image(systemName: "plus")
.font(.system(size: 15))
.frame(width: 20, height: 20)
.background(Color(SunsetPalette.accent).opacity(0.1), in: RoundedRectangle(cornerRadius: 6))
}
@@ -2363,9 +2358,9 @@ private struct PlayerContent: View {
.accessibilityLabel("Add to Queue…")
.disabled(!model.canOpen)
Spacer()
iconButton("backward.end.fill", "Previous Queue Item") { model.advanceQueue(-1) }
iconButton("backward.end.fill", "Previous Queue Item", size: 15) { model.advanceQueue(-1) }
.disabled(!model.canPreviousQueueItem)
iconButton("forward.end.fill", "Next Queue Item") { model.advanceQueue(1) }
iconButton("forward.end.fill", "Next Queue Item", size: 15) { model.advanceQueue(1) }
.disabled(!model.canNextQueueItem)
}
.padding(.horizontal, 12)
@@ -2373,6 +2368,11 @@ private struct PlayerContent: View {
}
.frame(width: 260)
.background(PlayerGlass(cornerRadius: 0))
.overlay(alignment: .topTrailing) {
titleControls
.padding(.trailing, 4)
.frame(height: 32)
}
.dropDestination(for: URL.self) { urls, _ in
guard model.canOpen, urls.contains(where: \.isFileURL) else { return false }
model.addToQueue(urls)