From 6c7249ec48c151de6b4c3e5346406825bcb76701 Mon Sep 17 00:00:00 2001 From: Beingpax Date: Sun, 15 Jun 2025 19:13:57 +0545 Subject: [PATCH] Consistent background color scheme --- VoiceInk/PowerMode/PowerModeView.swift | 5 +- VoiceInk/Views/AudioTranscribeView.swift | 137 +++++++++--------- VoiceInk/Views/Metrics/MetricsSetupView.swift | 2 +- VoiceInk/Views/RecordView.swift | 2 +- VoiceInk/Views/Settings/SettingsView.swift | 7 +- 5 files changed, 78 insertions(+), 75 deletions(-) diff --git a/VoiceInk/PowerMode/PowerModeView.swift b/VoiceInk/PowerMode/PowerModeView.swift index e090582..8c3654f 100644 --- a/VoiceInk/PowerMode/PowerModeView.swift +++ b/VoiceInk/PowerMode/PowerModeView.swift @@ -196,7 +196,7 @@ struct PowerModeView: View { } .background( RoundedRectangle(cornerRadius: 16) - .fill(Color(NSColor.controlBackgroundColor).opacity(0.9)) + .fill(Color(NSColor.controlBackgroundColor)) ) .overlay( RoundedRectangle(cornerRadius: 16) @@ -231,7 +231,7 @@ struct PowerModeView: View { } .frame(maxWidth: .infinity) .padding(40) - .background(Color(NSColor.controlBackgroundColor).opacity(0.9)) + .background(Color(NSColor.controlBackgroundColor)) .cornerRadius(16) .shadow(color: Color(NSColor.shadowColor).opacity(0.05), radius: 5, y: 2) .padding(.horizontal) @@ -239,6 +239,7 @@ struct PowerModeView: View { } .padding(.bottom, 24) } + .background(Color(NSColor.controlBackgroundColor)) .navigationTitle("") .navigationDestination(for: ConfigurationMode.self) { mode in ConfigurationView(mode: mode, powerModeManager: powerModeManager) diff --git a/VoiceInk/Views/AudioTranscribeView.swift b/VoiceInk/Views/AudioTranscribeView.swift index e86028f..1c3cdb1 100644 --- a/VoiceInk/Views/AudioTranscribeView.swift +++ b/VoiceInk/Views/AudioTranscribeView.swift @@ -14,80 +14,85 @@ struct AudioTranscribeView: View { @State private var selectedPromptId: UUID? var body: some View { - VStack(spacing: 0) { - if transcriptionManager.isProcessing { - processingView - } else { - dropZoneView - } + ZStack { + Color(NSColor.controlBackgroundColor) + .ignoresSafeArea() - Divider() - .padding(.vertical) - - // Show current transcription result - if let transcription = transcriptionManager.currentTranscription { - ScrollView { - VStack(alignment: .leading, spacing: 16) { - Text("Transcription Result") - .font(.headline) - - if let enhancedText = transcription.enhancedText { - VStack(alignment: .leading, spacing: 8) { - HStack { - Text("Enhanced") - .font(.subheadline) - .foregroundColor(.secondary) - Spacer() - HStack(spacing: 8) { - AnimatedCopyButton(textToCopy: enhancedText) - AnimatedSaveButton(textToSave: enhancedText) + VStack(spacing: 0) { + if transcriptionManager.isProcessing { + processingView + } else { + dropZoneView + } + + Divider() + .padding(.vertical) + + // Show current transcription result + if let transcription = transcriptionManager.currentTranscription { + ScrollView { + VStack(alignment: .leading, spacing: 16) { + Text("Transcription Result") + .font(.headline) + + if let enhancedText = transcription.enhancedText { + VStack(alignment: .leading, spacing: 8) { + HStack { + Text("Enhanced") + .font(.subheadline) + .foregroundColor(.secondary) + Spacer() + HStack(spacing: 8) { + AnimatedCopyButton(textToCopy: enhancedText) + AnimatedSaveButton(textToSave: enhancedText) + } } + Text(enhancedText) + .textSelection(.enabled) + } + + Divider() + + VStack(alignment: .leading, spacing: 8) { + HStack { + Text("Original") + .font(.subheadline) + .foregroundColor(.secondary) + Spacer() + HStack(spacing: 8) { + AnimatedCopyButton(textToCopy: transcription.text) + AnimatedSaveButton(textToSave: transcription.text) + } + } + Text(transcription.text) + .textSelection(.enabled) + } + } else { + VStack(alignment: .leading, spacing: 8) { + HStack { + Text("Transcription") + .font(.subheadline) + .foregroundColor(.secondary) + Spacer() + HStack(spacing: 8) { + AnimatedCopyButton(textToCopy: transcription.text) + AnimatedSaveButton(textToSave: transcription.text) + } + } + Text(transcription.text) + .textSelection(.enabled) } - Text(enhancedText) - .textSelection(.enabled) } - Divider() - - VStack(alignment: .leading, spacing: 8) { - HStack { - Text("Original") - .font(.subheadline) - .foregroundColor(.secondary) - Spacer() - HStack(spacing: 8) { - AnimatedCopyButton(textToCopy: transcription.text) - AnimatedSaveButton(textToSave: transcription.text) - } - } - Text(transcription.text) - .textSelection(.enabled) - } - } else { - VStack(alignment: .leading, spacing: 8) { - HStack { - Text("Transcription") - .font(.subheadline) - .foregroundColor(.secondary) - Spacer() - HStack(spacing: 8) { - AnimatedCopyButton(textToCopy: transcription.text) - AnimatedSaveButton(textToSave: transcription.text) - } - } - Text(transcription.text) - .textSelection(.enabled) + HStack { + Text("Duration: \(formatDuration(transcription.duration))") + .font(.caption) + .foregroundColor(.secondary) + Spacer() } } - - HStack { - Text("Duration: \(formatDuration(transcription.duration))") - .font(.caption) - .foregroundColor(.secondary) - Spacer() - } + .padding() } - .padding() } } } diff --git a/VoiceInk/Views/Metrics/MetricsSetupView.swift b/VoiceInk/Views/Metrics/MetricsSetupView.swift index 7bbd381..7b74950 100644 --- a/VoiceInk/Views/Metrics/MetricsSetupView.swift +++ b/VoiceInk/Views/Metrics/MetricsSetupView.swift @@ -58,7 +58,7 @@ struct MetricsSetupView: View { .padding() } .frame(minWidth: 500, minHeight: 600) - .background(Color(NSColor.windowBackgroundColor)) + .background(Color(NSColor.controlBackgroundColor)) } private func setupStep(for index: Int) -> some View { diff --git a/VoiceInk/Views/RecordView.swift b/VoiceInk/Views/RecordView.swift index dd6639e..c25bba0 100644 --- a/VoiceInk/Views/RecordView.swift +++ b/VoiceInk/Views/RecordView.swift @@ -16,7 +16,7 @@ struct RecordView: View { ScrollView(showsIndicators: false) { mainContent } - .background(Color(.controlBackgroundColor).opacity(0.5)) + .background(Color(NSColor.controlBackgroundColor)) } private var mainContent: some View { diff --git a/VoiceInk/Views/Settings/SettingsView.swift b/VoiceInk/Views/Settings/SettingsView.swift index ea4fecb..b45c888 100644 --- a/VoiceInk/Views/Settings/SettingsView.swift +++ b/VoiceInk/Views/Settings/SettingsView.swift @@ -259,6 +259,7 @@ struct SettingsView: View { .padding(.horizontal, 20) .padding(.vertical, 6) } + .background(Color(NSColor.controlBackgroundColor)) .alert("Reset Onboarding", isPresented: $showResetOnboardingAlert) { Button("Cancel", role: .cancel) { } Button("Reset", role: .destructive) { @@ -337,11 +338,7 @@ struct SettingsSection: View { .frame(maxWidth: .infinity, alignment: .leading) .background( RoundedRectangle(cornerRadius: 12) - .fill(Color(NSColor.windowBackgroundColor)) - .overlay( - RoundedRectangle(cornerRadius: 12) - .fill(Color(NSColor.controlBackgroundColor).opacity(0.5)) - ) + .fill(Color(.windowBackgroundColor).opacity(0.4)) ) .overlay( RoundedRectangle(cornerRadius: 12)