commit 078b8c71d27f559f1d31814c072ae82e3ee4e0ec
parent 9cabd6e68760bf66ea4fcf3e93083c5d76c04114
Author: mcarare <48995920+mcarare@users.noreply.github.com>
Date: Wed, 1 Oct 2025 14:22:43 +0000
Bug 1991906 - Use MaterialTheme typography for language display name r=android-reviewers,avirvara,giorga
This patch updates the `LanguageDisplayName` composable to use `MaterialTheme.typography.bodyLarge` for its text style. This change removes the hardcoded `fontSize` of `20.sp` and aligns the component with the application's overall theme.
Differential Revision: https://phabricator.services.mozilla.com/D266998
Diffstat:
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/mobile/android/focus-android/app/src/main/java/org/mozilla/focus/locale/screen/LocaleFragmentCompose.kt b/mobile/android/focus-android/app/src/main/java/org/mozilla/focus/locale/screen/LocaleFragmentCompose.kt
@@ -17,6 +17,7 @@ import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.LazyListState
import androidx.compose.foundation.lazy.items
import androidx.compose.foundation.lazy.rememberLazyListState
+import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.RadioButton
import androidx.compose.material3.RadioButtonDefaults
import androidx.compose.material3.Text
@@ -29,10 +30,8 @@ import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.text.AnnotatedString
-import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
-import androidx.compose.ui.unit.sp
import kotlinx.coroutines.launch
import org.mozilla.focus.ui.theme.FocusTheme
import org.mozilla.focus.ui.theme.focusColors
@@ -160,9 +159,7 @@ private fun LanguageRadioButton(
private fun LanguageDisplayName(language: Language, onClick: (String) -> Unit) {
Text(
text = AnnotatedString(language.displayName!!),
- style = TextStyle(
- fontSize = 20.sp,
- ),
+ style = MaterialTheme.typography.bodyLarge,
modifier = Modifier
.padding(10.dp)
.clickable { onClick(language.tag) },