Yattee v2 rewrite

This commit is contained in:
Arkadiusz Fal
2026-02-08 18:31:16 +01:00
parent 20d0cfc0c7
commit 05f921d605
1043 changed files with 163875 additions and 68430 deletions

View File

@@ -0,0 +1,36 @@
//
// CompactPreviewButtonView.swift
// Yattee
//
// Simplified button preview for pill and mini player editors.
// Renders icon buttons without complex features like sliders, title/author, or spacers.
//
import SwiftUI
struct CompactPreviewButtonView: View {
let configuration: ControlButtonConfiguration
let size: CGFloat
var body: some View {
Image(systemName: iconName)
.font(.system(size: iconSize))
.foregroundStyle(.white.opacity(0.9))
.frame(width: size, height: size)
}
// MARK: - Private
/// Icon name, using seek settings for seek buttons
private var iconName: String {
if configuration.buttonType == .seek, let seekSettings = configuration.seekSettings {
return seekSettings.systemImage
}
return configuration.buttonType.systemImage
}
/// Play/pause is slightly larger than other buttons
private var iconSize: CGFloat {
configuration.buttonType == .playPause ? size * 0.9 : size * 0.7
}
}