From 4388350230c33133a60ab066b33e08a5a13f04b2 Mon Sep 17 00:00:00 2001 From: Terry Yiu Date: Fri, 11 Sep 2026 15:11:45 +0300 Subject: [PATCH] Widen macOS amount fields so large values don't clip MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit NumericField's macOS-only frame was hard-capped at 140pt, but the app's own max BTC supply (21,000,000) means Sats amounts can reach a ~21-character grouped string, which didn't fit — the field visibly clipped once typed input exceeded the cap. Lets it grow up to 220pt instead of a fixed 140pt. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01FXcrACM5sok3M1KQJ8kByy --- iosApp/iosApp/ContentView.swift | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/iosApp/iosApp/ContentView.swift b/iosApp/iosApp/ContentView.swift index 53759a7..50cf826 100644 --- a/iosApp/iosApp/ContentView.swift +++ b/iosApp/iosApp/ContentView.swift @@ -351,7 +351,12 @@ private struct NumericField: View { #endif .multilineTextAlignment(alignment) #if os(macOS) - .frame(maxWidth: 140) + // Bounded rather than unconstrained so the field doesn't grow to fill the whole row + // (the original reason for a fixed width here), but wide enough for the largest + // values this app actually displays — e.g. a Sats amount at the max BTC supply + // (`maxSupplyBtcAmount` * 100,000,000) is a 16-digit, comma-grouped ~21-character + // string, which a 140pt cap was clipping. + .frame(minWidth: 80, idealWidth: 140, maxWidth: 220) #endif .onAppear { text = NumberFormatKt.groupDigits(value: value) } .onChange(of: text) { newValue in