From 93aeee1611cf490a06fe3016f1408eae8ddf75c2 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Mon, 8 Dec 2025 18:52:19 +0100 Subject: [PATCH] tweak: centralize overlay max/min heights --- apps/macos/Sources/Clawdis/VoiceWakeOverlay.swift | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/macos/Sources/Clawdis/VoiceWakeOverlay.swift b/apps/macos/Sources/Clawdis/VoiceWakeOverlay.swift index e882a620c..e85f4a43c 100644 --- a/apps/macos/Sources/Clawdis/VoiceWakeOverlay.swift +++ b/apps/macos/Sources/Clawdis/VoiceWakeOverlay.swift @@ -29,6 +29,8 @@ final class VoiceWakeOverlayController: ObservableObject { private let buttonWidth: CGFloat = 36 private let spacing: CGFloat = 8 private let verticalPadding: CGFloat = 8 + private let maxHeight: CGFloat = 400 + private let minHeight: CGFloat = 48 func showPartial(transcript: String, attributed: NSAttributedString? = nil) { self.autoSendTask?.cancel() @@ -210,8 +212,8 @@ final class VoiceWakeOverlayController: ObservableObject { let contentHeight = ceil(used.height + (textInset.height * 2)) let total = contentHeight + self.verticalPadding * 2 - self.model.isOverflowing = total > 400 - return max(48, min(total, 400)) + self.model.isOverflowing = total > self.maxHeight + return max(self.minHeight, min(total, self.maxHeight)) } private func dismissTargetFrame(for frame: NSRect, reason: DismissReason, outcome: SendOutcome) -> NSRect? {