Fix visualizer height consistency
This commit is contained in:
parent
bef4a20b81
commit
2ac6fc6ca4
@ -97,7 +97,7 @@ struct AudioVisualizer: View {
|
||||
struct StaticVisualizer: View {
|
||||
private let barCount = 12
|
||||
private let barWidth: CGFloat = 3.0
|
||||
private let staticHeight: CGFloat = 3.0
|
||||
private let staticHeight: CGFloat = 4.0
|
||||
private let barSpacing: CGFloat = 2.0
|
||||
let color: Color
|
||||
|
||||
|
||||
@ -78,7 +78,6 @@ struct NotchRecorderView: View {
|
||||
HStack(spacing: 0) {
|
||||
Spacer() // Push visualizer to the right
|
||||
|
||||
// Visualizer - contained within right area with scaling
|
||||
Group {
|
||||
if whisperState.isProcessing {
|
||||
StaticVisualizer(color: .white)
|
||||
@ -88,10 +87,10 @@ struct NotchRecorderView: View {
|
||||
color: .white,
|
||||
isActive: whisperState.isRecording
|
||||
)
|
||||
// Apply a vertical scale transform to fit within the menu bar
|
||||
.scaleEffect(y: min(1.0, (menuBarHeight - 8) / 25), anchor: .center)
|
||||
}
|
||||
}
|
||||
|
||||
.scaleEffect(y: min(1.0, (menuBarHeight - 8) / 25), anchor: .center)
|
||||
.frame(width: 30)
|
||||
.padding(.trailing, 8) // Add padding to keep it away from the edge
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user