Fix visualizer bar count mismatch and better animation speeds
This commit is contained in:
parent
db50b490d4
commit
024d3f62a3
@ -69,7 +69,7 @@ struct AudioVisualizer: View {
|
|||||||
|
|
||||||
struct StaticVisualizer: View {
|
struct StaticVisualizer: View {
|
||||||
// Match AudioVisualizer dimensions
|
// Match AudioVisualizer dimensions
|
||||||
private let barCount = 14
|
private let barCount = 15
|
||||||
private let barWidth: CGFloat = 3
|
private let barWidth: CGFloat = 3
|
||||||
private let staticHeight: CGFloat = 4
|
private let staticHeight: CGFloat = 4
|
||||||
private let barSpacing: CGFloat = 2
|
private let barSpacing: CGFloat = 2
|
||||||
@ -105,6 +105,15 @@ struct ProcessingStatusDisplay: View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private var animationSpeed: Double {
|
||||||
|
switch mode {
|
||||||
|
case .transcribing:
|
||||||
|
return 0.18
|
||||||
|
case .enhancing:
|
||||||
|
return 0.22
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
VStack(spacing: 4) {
|
VStack(spacing: 4) {
|
||||||
Text(label)
|
Text(label)
|
||||||
@ -113,7 +122,7 @@ struct ProcessingStatusDisplay: View {
|
|||||||
.lineLimit(1)
|
.lineLimit(1)
|
||||||
.minimumScaleFactor(0.5)
|
.minimumScaleFactor(0.5)
|
||||||
|
|
||||||
ProgressAnimation(color: color)
|
ProgressAnimation(color: color, animationSpeed: animationSpeed)
|
||||||
}
|
}
|
||||||
.frame(height: 28) // Match AudioVisualizer maxHeight for no layout shift
|
.frame(height: 28) // Match AudioVisualizer maxHeight for no layout shift
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user