table_calendar icon indicating copy to clipboard operation
table_calendar copied to clipboard

Name of weekdays is not entirely visible when system font size is set to "Large" or "Largest" on Android

Open dJani97 opened this issue 2 years ago • 3 comments

Describe the bug Using default settings, the name of weekdays gets cropped off when the system font size is set to "Large" or "Largest" on Android:

image

As far as I know, many users use their phone this way.

To reproduce On Android, go to Settings -> Display -> Font size and set the system font to Large or Largest: image

Check the TableCalendar widget.

Expected behavior Expected the weekdays to remain fully visible.

Screenshots See above

Output of flutter doctor Paste the result of this command here.

[√] Flutter (Channel stable, 3.0.2, on Microsoft Windows [Version 10.0.22000.778], locale hu-HU) [√] Android toolchain - develop for Android devices (Android SDK version 30.0.2) [√] Android Studio (version 2021.2) [√] IntelliJ IDEA Community Edition (version 2022.1) [√] Connected device (4 available) [√] HTTP Host Availability

Additional context I'm using Flutter 3 and Material 3 with table_calendar: ^3.0.6. The issues is still present when switching back to Material 2, albeit to a lesser extent.

dJani97 avatar Jul 10 '22 13:07 dJani97

Try using daysOfWeekHeight: 16 * MediaQuery.of(context).textScaleFactor - this should fix the cropping.

aleksanderwozniak avatar Jul 11 '22 17:07 aleksanderwozniak

Thank you, this works really well on all sizes.

My issue is solved, but to avoid such problems later on, could this be integrated into the package itself? I don't have much experience with how Flutter packages are supposed to handle text scaling, I'm just guessing it'd be better for everyone. Some devs may not even notice this issue, and end us shipping an app that doesn't scale well.

dJani97 avatar Jul 15 '22 03:07 dJani97