Skip to content

(ios) Fix Send footer clipping with large Dynamic Type#814

Open
Vidarte-Alberto wants to merge 1 commit into
ACINQ:masterfrom
Vidarte-Alberto:ios/fix-send-footer-large-dynamic-type
Open

(ios) Fix Send footer clipping with large Dynamic Type#814
Vidarte-Alberto wants to merge 1 commit into
ACINQ:masterfrom
Vidarte-Alberto:ios/fix-send-footer-large-dynamic-type

Conversation

@Vidarte-Alberto

Copy link
Copy Markdown

Problem

When the user has an accessibility font size enabled, the four action buttons in the Send screen footer (paste, choose image, nfc, scan qr code) overflow their container. Because the caption labels scale with Dynamic Type, maxButtonWidth grows large enough that the total width of the four buttons exceeds the screen width.

The ViewThatFits fallback does not catch this correctly: it measures the layout during a first pass when maxButtonWidth is still nil, commits to footer_standard(), and then overflows silently after the GeometryPreferenceReader updates the value. As a result, the leftmost and rightmost buttons are clipped off-screen.

Screenshots

Before After
Before After - ScrollView

Fix

Detected the accessibility font size via @Environment(\.dynamicTypeSize). When isAccessibilitySize is true, the ViewThatFits layout is replaced with a horizontal ScrollView.

The scroll variant uses the exact same round buttons and maxButtonWidth equal-width logic — it is purely a layout change. For all non-accessibility font sizes, the standard behavior remains completely unchanged.

How to Test

  1. Launch the app in the iOS Simulator.
  2. Go to Settings > Accessibility > Display & Text Size > Larger Text, and enable a large accessibility size.
  3. Navigate to the Send screen. Verify that the footer buttons can now be scrolled horizontally without being clipped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant