Skip to content

fix: prevent button text wrapping on narrow devices#401

Merged
awaseem merged 1 commit into
awaseem:mainfrom
muhamedfazalps:fix/button-text-wrapping
Jun 15, 2026
Merged

fix: prevent button text wrapping on narrow devices#401
awaseem merged 1 commit into
awaseem:mainfrom
muhamedfazalps:fix/button-text-wrapping

Conversation

@muhamedfazalps

Copy link
Copy Markdown
Contributor

Problem

Fixes #399 — Support button text wraps to two lines on narrow devices (iPhone 13 mini)

Root Cause

In RoundedButton.swift, the Text(text) component had no line limit set. On narrow screens where the button width is constrained (alongside the gear button and padding), "Support" wraps to the next line.

Fix

Added .lineLimit(1) to the Text in RoundedButton.swift (line 57). This prevents text from wrapping while preserving the rest of the button's existing layout behavior.

Before

┌───────────┐ ┌──┐
│ Support   │ │⚙│
│           │ └──┘
└───────────┘

After

┌────────┐ ┌──┐
│Support │ │⚙│
└────────┘ └──┘

Testing

  • Verified button text stays on one line on iPhone 13 mini
  • Verified other RoundedButton instances are unaffected
  • Builds without errors

If this fix helped, consider buying me a coffee! ☕
Buy Me A Coffee

RoundedButton text would wrap to multiple lines on narrow screens
(iPhone 13 mini) because Text had no line limit set.

Add `.lineLimit(1)` to ensure text stays on one line.

Fixes awaseem#399
@awaseem

awaseem commented Jun 15, 2026

Copy link
Copy Markdown
Owner

Thanks for the contribution!

@awaseem awaseem merged commit f299e31 into awaseem:main Jun 15, 2026
1 check passed
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.

Support Button Wrapping on Narrow Devices

2 participants