Fix: button overflow in Select Directory#521
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes a UI overflow issue in the Settings → Select Directory tile that occurs when using languages with long translations (e.g., Spanish). The fix wraps the two action buttons in an IntrinsicHeight widget with Expanded children to enable multiline text labels and ensure both buttons match heights for visual consistency.
Key Changes:
- Wrapped the button row in
IntrinsicHeightwithCrossAxisAlignment.stretchto enforce equal heights - Replaced
const Spacer()withconst SizedBox(width: 10)for consistent spacing - Added text wrapping properties (
textAlign,softWrap,maxLines,overflow) to both button labels
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| child: Text( | ||
| SentenceManager( | ||
| currentLanguage: | ||
| controller.selectedLanguage.value) | ||
| .sentences | ||
| .settingsPageSetToDefault, | ||
| textAlign: TextAlign.center, | ||
| softWrap: true, | ||
| maxLines: 2, | ||
| style: TextStyle( | ||
| color: tColors.purpleShade, | ||
| ), | ||
| ), |
There was a problem hiding this comment.
The first button's Text widget is missing the overflow property, which is inconsistent with the second button at line 207. For consistency and to ensure proper text overflow behavior when translations are long, both buttons should have the same overflow handling. Consider adding overflow: TextOverflow.visible, after maxLines: 2, on line 180.
Description
This change fixes the UI pixel overflow on the Settings → Select Directory tile when using languages with long translations (for example Spanish). The two action buttons now support multiline labels and are forced to match each other’s size so they remain visually consistent and do not cause layout overflow.
Fixes #520
Screenshots
Checklist