From b18eee766dee04cb2e3e14ae15c92cb133f8b58c Mon Sep 17 00:00:00 2001 From: Tobias Zwick Date: Wed, 18 Sep 2024 11:48:20 +0200 Subject: [PATCH] make preference values hyphenate automatically --- .../streetcomplete/ui/common/settings/Preference.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/de/westnordost/streetcomplete/ui/common/settings/Preference.kt b/app/src/main/java/de/westnordost/streetcomplete/ui/common/settings/Preference.kt index 0af98602da..38b1b622f5 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/ui/common/settings/Preference.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/ui/common/settings/Preference.kt @@ -22,6 +22,7 @@ import androidx.compose.runtime.CompositionLocalProvider import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.res.painterResource +import androidx.compose.ui.text.style.Hyphens import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp @@ -82,7 +83,10 @@ fun Preference( ) if (value != null) { CompositionLocalProvider( - LocalTextStyle provides LocalTextStyle.current.copy(textAlign = TextAlign.End), + LocalTextStyle provides LocalTextStyle.current.copy( + textAlign = TextAlign.End, + hyphens = Hyphens.Auto + ), LocalContentAlpha provides ContentAlpha.medium ) { Row(