Fastest and only macOS Dictation app with on-device STT and custom trained AI enhancement model. Windows, iOS testflight! Android, Linux waitlist open! A local Wispr Flow alternative. Follow https://x.com/fluidvoiceapp for more
UI bug fix
altic-dev653c7581ae22
diff --git a/Sources/Fluid/UI/GlossyEffects.swift b/Sources/Fluid/UI/GlossyEffects.swiftindex 71b7a394..81458293 100644--- a/Sources/Fluid/UI/GlossyEffects.swift+++ b/Sources/Fluid/UI/GlossyEffects.swift@@ -16,16 +16,14 @@ struct HoverableGlossyCard<Content: View>: View {content.background(RoundedRectangle(cornerRadius: 20)- .fill(.ultraThinMaterial.opacity(0.8))+ .fill(Color(red: 0.10, green: 0.12, blue: 0.20).opacity(0.85)).background(RoundedRectangle(cornerRadius: 20).fill(LinearGradient(colors: [- Color(red: 0.12, green: 0.14, blue: 0.22).opacity(0.4), // Deep tech blue- Color(red: 0.08, green: 0.10, blue: 0.18).opacity(0.2), // Blue-charcoal- Color(red: 0.05, green: 0.06, blue: 0.12).opacity(0.1), // Rich blue-black- Color(red: 0.10, green: 0.12, blue: 0.20).opacity(0.3) // Dark blue accent+ Color(red: 0.10, green: 0.12, blue: 0.20).opacity(0.4),+ Color(red: 0.06, green: 0.08, blue: 0.14).opacity(0.25)],startPoint: .topLeading,endPoint: .bottomTrailing@@ -34,12 +32,9 @@ struct HoverableGlossyCard<Content: View>: View {).overlay(RoundedRectangle(cornerRadius: 20)- .stroke(Color.white.opacity(isHovered ? 0.4 : 0.2), lineWidth: isHovered ? 1.5 : 1)- .blur(radius: 0.5)+ .stroke(Color.white.opacity(isHovered ? 0.35 : 0.18), lineWidth: isHovered ? 1.5 : 1))- .shadow(color: Color(red: 0.02, green: 0.03, blue: 0.06).opacity(isHovered ? 0.8 : 0.5), radius: isHovered ? 40 : 30, x: 0, y: isHovered ? 20 : 15)- .shadow(color: Color(red: 0.01, green: 0.02, blue: 0.04).opacity(isHovered ? 0.6 : 0.3), radius: isHovered ? 20 : 12, x: 0, y: isHovered ? 8 : 5)- .shadow(color: Color(red: 0.06, green: 0.08, blue: 0.15).opacity(isHovered ? 0.3 : 0.1), radius: isHovered ? 8 : 4, x: 0, y: isHovered ? 3 : 2)+ .shadow(color: Color.black.opacity(isHovered ? 0.45 : 0.28), radius: isHovered ? 24 : 18, x: 0, y: isHovered ? 12 : 8)).brightness(isHovered && !excludeInteractiveElements ? 0.02 : 0.0).onHover { hovering in@@ -93,16 +88,14 @@ struct EnhancedGlassButtonStyle: ButtonStyle {.padding(.vertical, 12).background(RoundedRectangle(cornerRadius: 10)- .fill(.ultraThinMaterial.opacity(0.9))+ .fill(Color(red: 0.12, green: 0.14, blue: 0.24).opacity(0.9)).background(RoundedRectangle(cornerRadius: 10).fill(LinearGradient(colors: [- Color(red: 0.15, green: 0.17, blue: 0.28).opacity(isHovered ? 0.5 : 0.3), // Deep tech blue- Color(red: 0.08, green: 0.10, blue: 0.18).opacity(isHovered ? 0.3 : 0.15), // Blue-charcoal- Color(red: 0.05, green: 0.06, blue: 0.12).opacity(0.1), // Rich blue-black- Color(red: 0.12, green: 0.14, blue: 0.24).opacity(isHovered ? 0.4 : 0.2) // Dark blue accent+ Color(red: 0.12, green: 0.14, blue: 0.24).opacity(isHovered ? 0.45 : 0.3),+ Color(red: 0.07, green: 0.09, blue: 0.16).opacity(isHovered ? 0.25 : 0.15)],startPoint: .topLeading,endPoint: .bottomTrailing@@ -111,11 +104,9 @@ struct EnhancedGlassButtonStyle: ButtonStyle {).overlay(RoundedRectangle(cornerRadius: 10)- .stroke(Color.white.opacity(isHovered ? 0.4 : 0.25), lineWidth: isHovered ? 1.5 : 1)- .blur(radius: 0.3)+ .stroke(Color.white.opacity(isHovered ? 0.35 : 0.22), lineWidth: isHovered ? 1.5 : 1))- .shadow(color: Color(red: 0.02, green: 0.03, blue: 0.06).opacity(isHovered ? 0.7 : 0.4), radius: isHovered ? 15 : 10, x: 0, y: isHovered ? 8 : 5)- .shadow(color: Color(red: 0.06, green: 0.08, blue: 0.15).opacity(isHovered ? 0.3 : 0.15), radius: isHovered ? 6 : 3, x: 0, y: isHovered ? 3 : 2)+ .shadow(color: Color.black.opacity(isHovered ? 0.5 : 0.3), radius: isHovered ? 14 : 10, x: 0, y: isHovered ? 7 : 5)).scaleEffect(configuration.isPressed ? 0.96 : (isHovered ? 1.05 : 1.0)).brightness(isHovered ? 0.05 : 0.0)diff --git a/Sources/Fluid/UI/MouseTracker.swift b/Sources/Fluid/UI/MouseTracker.swiftindex 0ba6a117..f12e2d77 100644--- a/Sources/Fluid/UI/MouseTracker.swift+++ b/Sources/Fluid/UI/MouseTracker.swift@@ -7,7 +7,9 @@ class MousePositionTracker: ObservableObject {@Published var windowFrame: CGRect = .zeroprivate var lastUpdateTime: TimeInterval = 0- private let updateInterval: TimeInterval = 1.0/30.0 // 30fps+ private var lastFrameUpdateTime: TimeInterval = 0+ private let updateInterval: TimeInterval = 1.0/15.0 // 15fps (reduced for performance during gestures)+ private let frameUpdateInterval: TimeInterval = 0.1 // Debounce frame updates during scrollvar relativePosition: CGPoint {guard windowFrame.width > 0 && windowFrame.height > 0 else { return .zero }@@ -18,6 +20,10 @@ class MousePositionTracker: ObservableObject {}func updateMousePosition(_ position: CGPoint) {+ // Validate position to prevent infinity/NaN geometry errors+ guard position.x.isFinite && position.y.isFinite else { return }+ guard position.x >= 0 && position.y >= 0 else { return }+let now = CACurrentMediaTime()guard now - lastUpdateTime >= updateInterval else { return }@@ -26,7 +32,17 @@ class MousePositionTracker: ObservableObject {}func updateWindowFrame(_ frame: CGRect) {+ // Validate frame to prevent infinity/NaN geometry errors+ guard frame.width.isFinite && frame.height.isFinite else { return }+ guard frame.minX.isFinite && frame.minY.isFinite else { return }+ guard frame.width > 0 && frame.height > 0 else { return }++ // Debounce frame updates during scroll to prevent rapid invalid geometry+ let now = CACurrentMediaTime()+ guard now - lastFrameUpdateTime >= frameUpdateInterval else { return }+windowFrame = frame+ lastFrameUpdateTime = now}}@@ -38,10 +54,14 @@ struct MouseTrackingModifier: ViewModifier {.onContinuousHover { phase inswitch phase {case .active(let location):+ // Validate location is finite before processing+ guard location.x.isFinite && location.y.isFinite else { return }+ guard tracker.windowFrame != .zero else { return }+// Convert to global coordinates for consistent trackinglet globalLocation = CGPoint(- x: location.x + (tracker.windowFrame.minX),- y: location.y + (tracker.windowFrame.minY)+ x: location.x + tracker.windowFrame.minX,+ y: location.y + tracker.windowFrame.minY)tracker.updateMousePosition(globalLocation)case .ended:@@ -56,6 +76,9 @@ struct MouseTrackingModifier: ViewModifier {tracker.updateWindowFrame(globalFrame)}.onChange(of: geometry.frame(in: .global)) { newFrame in+ // Skip updates when view is scrolled off-screen (prevents invalid geometry)+ guard newFrame.minY < NSScreen.main?.frame.height ?? 1000 else { return }+ guard newFrame.maxY > 0 else { return }tracker.updateWindowFrame(newFrame)}}