Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9d113965 authored by Josh's avatar Josh Committed by Joshua Mokut
Browse files

Enabling auto-hyphenation for shortcut description text.

Flag: com.android.systemui.keyboard_shortcut_helper_rewrite
Test: Manual - open shortcut helper, using one of the affected locales
and ensure that when linebreak happen in shortcut description text a
hyphen is added in the appriopriate place.
Fix: 419205387

Change-Id: Ie8248ce699d8bc7bd095848558fa04aa265b7c9f
parent 9837074d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -86,6 +86,7 @@ import androidx.compose.ui.semantics.role
import androidx.compose.ui.semantics.semantics
import androidx.compose.ui.text.SpanStyle
import androidx.compose.ui.text.buildAnnotatedString
import androidx.compose.ui.text.style.Hyphens
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.text.withStyle
@@ -502,7 +503,7 @@ private fun ShortcutDescriptionText(
    Text(
        modifier = modifier,
        text = textWithHighlightedSearchQuery(shortcut.label, searchQuery),
        style = MaterialTheme.typography.labelLarge,
        style = MaterialTheme.typography.labelLarge.copy(hyphens = Hyphens.Auto),
        color = MaterialTheme.colorScheme.onSurface,
    )
}