Skip to content

Commit

Permalink
make preference values hyphenate automatically
Browse files Browse the repository at this point in the history
  • Loading branch information
westnordost committed Sep 18, 2024
1 parent fd73b78 commit b18eee7
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit b18eee7

Please sign in to comment.