Fix visualizer height consistency

This commit is contained in:
Beingpax 2025-05-25 18:43:11 +05:45
parent bef4a20b81
commit 2ac6fc6ca4
2 changed files with 3 additions and 4 deletions

View File

@ -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

View File

@ -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
}