JetBrains / compose-multiplatform

Compose Multiplatform, a modern UI framework for Kotlin that makes building performant and beautiful user interfaces easy and enjoyable.
https://jetbrains.com/lp/compose-multiplatform
Apache License 2.0
15.46k stars 1.12k forks source link

Material 3 Text is not centered (has top and right margin/padding) #2383

Open mahozad opened 1 year ago

mahozad commented 1 year ago

I'm migrating to Material Design 3 and using components from androidx.compose.material3 instead of androidx.compose.material.

The string in Text composable has a little top margin/padding (and also end or right margin/padding) in the new Material 3:

Material 2 (old) Material 3 (new)
material-2 material-3

Here is a minimum reproducible project: test-text.zip

I'm using Compose JB 1.1.1, Kotlin 1.6.10, Java 17.0.4 and I am on Windows 11 and the app sets System.setProperty("skiko.renderApi", "OPENGL") because of #610.

mahozad commented 1 year ago

The problem still exists in compose multiplatform 1.3.0-rc5 and Kotlin 1.8.0 and Oracle JDK 17.0.5.

dima-avdeev-jb commented 1 year ago

@mahozad Thanks for this Issue!

dima-avdeev-jb commented 1 year ago

I will check a minimum reproducible project test-text.zip.

okushnikov commented 6 days ago

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.