From 64c7d11ca9a50b817195c1b020b8d6273c1508b0 Mon Sep 17 00:00:00 2001 From: gambit1185_church Date: Mon, 1 Jun 2026 11:32:56 -0600 Subject: [PATCH] fix: prevent subtitle truncation in banner, hud, and alert Long subtitles were getting cut off / ellipsized instead of wrapping. Apply `.lineLimit(nil)` + `.fixedSize(horizontal: false, vertical: true)` to the subtitle Text in all three layouts (banner, hud, alert) so they wrap to as many lines as needed. Extends the original fix from arslankaleem7229 (elai950/AlertToast#106), which only covered the banner layout, to hud and alert as well. Fixes long-subtitle truncation reported in elai950/AlertToast#61, #67. Co-Authored-By: arslankaleem7229 Co-Authored-By: Claude Opus 4.8 (1M context) --- Sources/AlertToast/AlertToast.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Sources/AlertToast/AlertToast.swift b/Sources/AlertToast/AlertToast.swift index 17bf751..ac7d99d 100644 --- a/Sources/AlertToast/AlertToast.swift +++ b/Sources/AlertToast/AlertToast.swift @@ -266,6 +266,8 @@ public struct AlertToast: View{ if let subTitle = subTitle { Text(LocalizedStringKey(subTitle)) .font(style?.subTitleFont ?? Font.subheadline) + .lineLimit(nil) + .fixedSize(horizontal: false, vertical: true) } } .multilineTextAlignment(.leading) @@ -319,6 +321,8 @@ public struct AlertToast: View{ .opacity(0.7) .multilineTextAlignment(.center) .textColor(style?.subtitleColor ?? nil) + .lineLimit(nil) + .fixedSize(horizontal: false, vertical: true) } } } @@ -385,6 +389,8 @@ public struct AlertToast: View{ .opacity(0.7) .multilineTextAlignment(.center) .textColor(style?.subtitleColor ?? nil) + .lineLimit(nil) + .fixedSize(horizontal: false, vertical: true) } } }