From e84d032e8d545e8eb207f1080de8dd22a275c8e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Bj=C3=B6rkert?= Date: Sun, 11 Oct 2026 19:30:25 +0200 Subject: [PATCH] Fit the Live Activity lock screen card on narrow screens The left column and the metric grid used fixed minimum widths that needed about 369 pt, so with Display Zoom the card was wider than the lock screen and the glucose value and delta got cut off. They now share the available width, and the metric blocks shrink below 72 pt when needed. Fixes #744 --- LoopFollowLAExtension/LoopFollowLiveActivity.swift | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/LoopFollowLAExtension/LoopFollowLiveActivity.swift b/LoopFollowLAExtension/LoopFollowLiveActivity.swift index 6d438531e..caeb90393 100644 --- a/LoopFollowLAExtension/LoopFollowLiveActivity.swift +++ b/LoopFollowLAExtension/LoopFollowLiveActivity.swift @@ -214,8 +214,7 @@ private struct LockScreenLiveActivityView: View { .foregroundStyle(.white.opacity(0.80)) .lineLimit(1) } - .frame(minWidth: 160, maxWidth: 184, alignment: .leading) - .layoutPriority(2) + .frame(maxWidth: .infinity, alignment: .leading) Rectangle() .fill(Color.white.opacity(0.20)) @@ -322,7 +321,7 @@ private struct MetricBlock: View { .allowsTightening(true) .layoutPriority(1) } - .frame(width: 72, alignment: .leading) + .frame(maxWidth: 72, alignment: .leading) } } @@ -360,7 +359,7 @@ private struct SlotView: View { var body: some View { if option == .none { Color.clear - .frame(width: 72, height: 36) + .frame(maxWidth: 72, minHeight: 36, maxHeight: 36) } else { MetricBlock(label: option.gridLabel, value: slotFormattedValue(option: option, snapshot: snapshot)) }