Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Layout issues when increasing the system font size #66

Closed
Abestanis opened this issue Jun 17, 2022 · 2 comments · Fixed by #134
Closed

Layout issues when increasing the system font size #66

Abestanis opened this issue Jun 17, 2022 · 2 comments · Fixed by #134
Assignees
Labels
bug Something isn't working

Comments

@Abestanis
Copy link
Collaborator

Steps to reproduce

  1. Increase the system font size in the Android settings. (Anything that causes a MediaQuery.textScaleFactor >= 1.1)
  2. Open the app.

What did you expect?

There should be no layout issues.

What happened instead?

The height given for the SongTitle widget is not enough to contain the two lines of text. This is because kSongTileHeight doesn't take the textScaleFactor into account.

Additionally, the tab header widget on the bottom is partially hidden behind the bottom sheet.

Layout issues on higher textscale settings

For context, the default font size setting on my phone produces a textScaleFactor of 1.1. The old version of Sweyer (1.0.7) does not have this problem.

Sweyer version

Latest on the 1.0.8 branch; 4460b5a

Android version

No response

@nt4f04uNd
Copy link
Owner

nt4f04uNd commented Apr 2, 2023

https://github.com/nt4f04uNd/sweyer/pull/82/files#diff-f563e2d9accf0b7a7337dfcc537e67f01029975f7b3f5160b58a6c2006d9cb27R425

We need to report this bug to styled_text: when using a Text.rich with WidgetSpan with StyledText as a child, and both Text.rich and StyledText have a text style, the textScaleFactor scales the text twice as much, unless we explicitly specify textScaleFactor = 1.0 on either of them.

I don't have time right now to make this into a detailed issue with a reproducible code sample - so leaving a comment here to come back to doing this later.

@nt4f04uNd
Copy link
Owner

andyduke/styled_text_package#83 opened and issue and passed it to TODOs in code

Finally closing this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants