iOS 1.0 RC 1: battery and heat work, version label, web player redraw tweaks
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
0fc35b13e8
commit
c0e33b5e3e
18 files changed
+143
-36
No files matched your search
@@ -229,7 +229,8 @@ struct PlayingBars: View {
|
||||
var color: Color?
|
||||
@Environment(\.palette) private var p
|
||||
var body: some View {
|
||||
TimelineView(.animation(paused: !playing)) { tl in
|
||||
// 30 fps is plenty for a 16 pt glyph; ProMotion would otherwise redraw it 120 times a second.
|
||||
TimelineView(.animation(minimumInterval: 1 / 30, paused: !playing)) { tl in
|
||||
let phase = tl.date.timeIntervalSinceReferenceDate * (2 * .pi / 1.1)
|
||||
Canvas { ctx, size in
|
||||
let w = size.width / 4.5
|
||||
|
||||
@@ -521,7 +521,9 @@ struct ProgressVolumeBar: View {
|
||||
let dur = pm.durationMs
|
||||
let volScale = 0.14 + 0.86 * Double(masterTaper(master)).squareRoot().squareRoot()
|
||||
let adjusting = axis == 2
|
||||
TimelineView(.animation(paused: !pm.playWhenReady || scrub != nil)) { _ in
|
||||
// Bars are discrete and the clock shows seconds, so a few redraws a second look the same
|
||||
// as 120. A drag redraws through [scrub] and the volume through [master].
|
||||
TimelineView(.animation(minimumInterval: 0.25, paused: !pm.playWhenReady || scrub != nil)) { _ in
|
||||
let pos = scrub.map { Int64($0 * Double(dur)) } ?? pm.positionMs()
|
||||
let frac = dur > 0 ? min(max(Double(pos) / Double(dur), 0), 1) : 0
|
||||
VStack(spacing: 12) {
|
||||
@@ -711,7 +713,8 @@ private struct MixerPanel: View {
|
||||
.padding(.vertical, 8)
|
||||
}
|
||||
}
|
||||
TimelineView(.animation(paused: !stems || !pm.playWhenReady)) { _ in
|
||||
// The meters' fall is timed, so 30 fps looks the same and costs a quarter of 120.
|
||||
TimelineView(.animation(minimumInterval: 1 / 30, paused: !stems || !pm.playWhenReady)) { _ in
|
||||
let levels = stems ? meters.step(pm.engine, names.count) : []
|
||||
VStack(spacing: 0) {
|
||||
ForEach(Array(names.enumerated()), id: \.element) { i, name in
|
||||
@@ -1010,7 +1013,7 @@ struct MiniPlayer: View {
|
||||
}
|
||||
.overlay(alignment: .bottom) {
|
||||
// Thin progress line along the bottom of the card.
|
||||
TimelineView(.animation(minimumInterval: 0.25, paused: !pm.playWhenReady)) { _ in
|
||||
TimelineView(.animation(minimumInterval: 0.5, paused: !pm.playWhenReady)) { _ in
|
||||
let d = pm.durationMs
|
||||
let f = d > 0 ? min(max(Double(pm.positionMs()) / Double(d), 0), 1) : 0
|
||||
GeometryReader { geo in p.accent.frame(width: geo.size.width * f, height: 2) }.frame(height: 2)
|
||||
|
||||
@@ -169,7 +169,8 @@ private struct PathStop: View {
|
||||
|
||||
private let appVersion: String = {
|
||||
let info = Bundle.main.infoDictionary
|
||||
return "\(info?["CFBundleShortVersionString"] as? String ?? "1.1") (\(info?["CFBundleVersion"] as? String ?? "1"))"
|
||||
let label = info?["StemifyVersionLabel"] as? String ?? info?["CFBundleShortVersionString"] as? String ?? "1.0"
|
||||
return "\(label) (\(info?["CFBundleVersion"] as? String ?? "1"))"
|
||||
}()
|
||||
|
||||
// ---- settings -------------------------------------------------------------------------------
|
||||
|
||||
Reference in new issue
Block a user