From 61527e3b1d1deb39b3ee73f74cfbf75d4b8894b3 Mon Sep 17 00:00:00 2001 From: mehmetefeaytas Date: Thu, 23 Jul 2026 22:29:40 +0300 Subject: [PATCH] fix(hud): keep all AirPods listening modes visible in the notch HUD MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The listening-mode label used a trailing-aligned Text only for Transparency/Off and a MarqueeText for the longer modes (Noise Cancellation / Adaptive Audio / Conversation Awareness). MarqueeText is `.leading`-aligned internally, so those labels hugged the notch edge and were clipped behind it — only Transparency/Off stayed visible. Render every mode with a single trailing-aligned, scaling Text so all listening modes remain on screen. Co-Authored-By: Claude Opus 4.8 (1M context) --- .../Live activities/InlineHUD.swift | 43 ++++++++----------- 1 file changed, 19 insertions(+), 24 deletions(-) diff --git a/DynamicIsland/components/Live activities/InlineHUD.swift b/DynamicIsland/components/Live activities/InlineHUD.swift index 2d151466..6d87b438 100644 --- a/DynamicIsland/components/Live activities/InlineHUD.swift +++ b/DynamicIsland/components/Live activities/InlineHUD.swift @@ -363,30 +363,25 @@ struct InlineHUD: View { if let listeningMode { let listeningModeTextWidth: CGFloat = enableMinimalisticUI ? 96 : 124 - HStack(spacing: 0) { - Spacer(minLength: 0) - if listeningMode == .off || listeningMode == .transparency { - Text(listeningMode.displayName) - .font(.caption.weight(.medium)) - .foregroundStyle(.white) - .lineLimit(1) - .allowsTightening(true) - .frame( - width: min(max(trailingWidth - 44, 64), listeningModeTextWidth), - alignment: .trailing - ) - } else { - MarqueeText( - .constant(listeningMode.displayName), - font: .caption.weight(.medium), - nsFont: .caption1, - textColor: .white, - minDuration: 0.6, - frameWidth: min(max(trailingWidth - 44, 64), listeningModeTextWidth) - ) - } - } - .frame(maxWidth: .infinity, alignment: .trailing) + // Render every mode label with a trailing-aligned Text. + // The previous MarqueeText path is `.leading`-aligned + // internally, so the longer modes (Noise Cancellation / + // Adaptive Audio / Conversation Awareness) hugged the notch + // edge and were clipped behind it — only the short, + // trailing-aligned modes (Transparency / Off) stayed + // visible. A scaling Text keeps every mode on screen. + Text(listeningMode.displayName) + .font(.caption.weight(.medium)) + .foregroundStyle(.white) + .lineLimit(1) + .minimumScaleFactor(0.6) + .truncationMode(.tail) + .allowsTightening(true) + .frame( + width: min(max(trailingWidth - 44, 64), listeningModeTextWidth), + alignment: .trailing + ) + .frame(maxWidth: .infinity, alignment: .trailing) } else if hasBatteryLevel { let indicatorSpacing: CGFloat = { if useCircularIndicator {