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

FixedSizeText 관련 버그 #27

Closed
easyhooon opened this issue Jul 30, 2023 · 3 comments
Closed

FixedSizeText 관련 버그 #27

easyhooon opened this issue Jul 30, 2023 · 3 comments
Assignees
Labels
design tasks related to design aspects of the project

Comments

@easyhooon
Copy link
Collaborator

몇몇 Text 에 대해서 FixedSizeText 를 적용하면 글자가 사라지는 이슈
(홈화면 "추가", "공유하기" 에서 발생)

이를 Text 로 변환 후 sp 에 대해 .nonScale 를 적용 하면 정상적으로 보여짐(뭔 차이 인데??)

그 원인을 알아보는 중

@easyhooon easyhooon self-assigned this Jul 30, 2023
@easyhooon easyhooon added the design tasks related to design aspects of the project label Jul 30, 2023
@easyhooon
Copy link
Collaborator Author

easyhooon commented Aug 3, 2023

버튼 안에 들어있는 FixedSizeText 에 대해 보이지 않는다는 공통점을 발견
버튼 안에 들어있지 않은 FixedSizeText 는 정상적으로 출력됨

그 이유를 알아봐야겠다

@easyhooon
Copy link
Collaborator Author

easyhooon commented Aug 9, 2023

val TextUnit.nonScaleSp
  @Composable
  get() = if (this == TextUnit.Unspecified) this
  else (this.value / LocalDensity.current.fontScale).sp

확장함수를 다음과 같이 변경하였을때 문제가 사라짐을 확인

@easyhooon
Copy link
Collaborator Author

FixedSizeText 관련 이슈 해결

TextUnit.Unspecified 일때는 그대로 반환되도록 처리

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design tasks related to design aspects of the project
Projects
None yet
Development

No branches or pull requests

1 participant