diff --git a/app/src/main/java/org/thoughtcrime/securesms/linkdevice/LinkDeviceFragment.kt b/app/src/main/java/org/thoughtcrime/securesms/linkdevice/LinkDeviceFragment.kt index fb2fe6d8c5..f007437b34 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/linkdevice/LinkDeviceFragment.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/linkdevice/LinkDeviceFragment.kt @@ -554,8 +554,7 @@ fun DeviceRow(device: Device, setDeviceToRemove: (Device) -> Unit, onEditDevice: ) Text( text = stringResource(R.string.LinkDeviceFragment__unlink), - modifier = Modifier.padding(horizontal = 16.dp), - style = MaterialTheme.typography.bodyLarge + modifier = Modifier.padding(horizontal = 16.dp) ) } }, @@ -579,8 +578,7 @@ fun DeviceRow(device: Device, setDeviceToRemove: (Device) -> Unit, onEditDevice: ) Text( text = stringResource(R.string.LinkDeviceFragment__edit_name), - modifier = Modifier.padding(horizontal = 16.dp), - style = MaterialTheme.typography.bodyLarge + modifier = Modifier.padding(horizontal = 16.dp) ) } }, diff --git a/app/src/main/java/org/thoughtcrime/securesms/main/MainToolbar.kt b/app/src/main/java/org/thoughtcrime/securesms/main/MainToolbar.kt index 8c992c5143..de2413310f 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/main/MainToolbar.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/main/MainToolbar.kt @@ -537,8 +537,7 @@ private fun StoryDropDownItems(callback: MainToolbarCallback, onOptionSelected: DropdownMenus.Item( text = { Text( - text = stringResource(R.string.StoriesLandingFragment__story_privacy), - style = MaterialTheme.typography.bodyLarge + text = stringResource(R.string.StoriesLandingFragment__story_privacy) ) }, onClick = { @@ -553,8 +552,7 @@ private fun CallDropdownItems(callFilter: CallLogFilter, callback: MainToolbarCa DropdownMenus.Item( text = { Text( - text = stringResource(R.string.CallLogFragment__clear_call_history), - style = MaterialTheme.typography.bodyLarge + text = stringResource(R.string.CallLogFragment__clear_call_history) ) }, onClick = { @@ -567,8 +565,7 @@ private fun CallDropdownItems(callFilter: CallLogFilter, callback: MainToolbarCa DropdownMenus.Item( text = { Text( - text = stringResource(R.string.CallLogFragment__filter_missed_calls), - style = MaterialTheme.typography.bodyLarge + text = stringResource(R.string.CallLogFragment__filter_missed_calls) ) }, onClick = { @@ -580,8 +577,7 @@ private fun CallDropdownItems(callFilter: CallLogFilter, callback: MainToolbarCa DropdownMenus.Item( text = { Text( - text = stringResource(R.string.CallLogFragment__clear_filter), - style = MaterialTheme.typography.bodyLarge + text = stringResource(R.string.CallLogFragment__clear_filter) ) }, onClick = { @@ -594,8 +590,7 @@ private fun CallDropdownItems(callFilter: CallLogFilter, callback: MainToolbarCa DropdownMenus.Item( text = { Text( - text = stringResource(R.string.text_secure_normal__menu_settings), - style = MaterialTheme.typography.bodyLarge + text = stringResource(R.string.text_secure_normal__menu_settings) ) }, onClick = { @@ -607,8 +602,7 @@ private fun CallDropdownItems(callFilter: CallLogFilter, callback: MainToolbarCa DropdownMenus.Item( text = { Text( - text = stringResource(R.string.ConversationListFragment__notification_profile), - style = MaterialTheme.typography.bodyLarge + text = stringResource(R.string.ConversationListFragment__notification_profile) ) }, onClick = { @@ -623,8 +617,7 @@ private fun ChatDropdownItems(state: MainToolbarState, callback: MainToolbarCall DropdownMenus.Item( text = { Text( - text = stringResource(R.string.text_secure_normal__menu_new_group), - style = MaterialTheme.typography.bodyLarge + text = stringResource(R.string.text_secure_normal__menu_new_group) ) }, onClick = { @@ -637,8 +630,7 @@ private fun ChatDropdownItems(state: MainToolbarState, callback: MainToolbarCall DropdownMenus.Item( text = { Text( - text = stringResource(R.string.text_secure_normal__menu_clear_passphrase), - style = MaterialTheme.typography.bodyLarge + text = stringResource(R.string.text_secure_normal__menu_clear_passphrase) ) }, onClick = { @@ -651,8 +643,7 @@ private fun ChatDropdownItems(state: MainToolbarState, callback: MainToolbarCall DropdownMenus.Item( text = { Text( - text = stringResource(R.string.text_secure_normal__mark_all_as_read), - style = MaterialTheme.typography.bodyLarge + text = stringResource(R.string.text_secure_normal__mark_all_as_read) ) }, onClick = { @@ -664,8 +655,7 @@ private fun ChatDropdownItems(state: MainToolbarState, callback: MainToolbarCall DropdownMenus.Item( text = { Text( - text = stringResource(R.string.text_secure_normal__invite_friends), - style = MaterialTheme.typography.bodyLarge + text = stringResource(R.string.text_secure_normal__invite_friends) ) }, onClick = { @@ -678,8 +668,7 @@ private fun ChatDropdownItems(state: MainToolbarState, callback: MainToolbarCall DropdownMenus.Item( text = { Text( - text = stringResource(R.string.text_secure_normal__filter_unread_chats), - style = MaterialTheme.typography.bodyLarge + text = stringResource(R.string.text_secure_normal__filter_unread_chats) ) }, onClick = { @@ -691,8 +680,7 @@ private fun ChatDropdownItems(state: MainToolbarState, callback: MainToolbarCall DropdownMenus.Item( text = { Text( - text = stringResource(R.string.text_secure_normal__clear_unread_filter), - style = MaterialTheme.typography.bodyLarge + text = stringResource(R.string.text_secure_normal__clear_unread_filter) ) }, onClick = { @@ -705,8 +693,7 @@ private fun ChatDropdownItems(state: MainToolbarState, callback: MainToolbarCall DropdownMenus.Item( text = { Text( - text = stringResource(R.string.text_secure_normal__menu_settings), - style = MaterialTheme.typography.bodyLarge + text = stringResource(R.string.text_secure_normal__menu_settings) ) }, onClick = { @@ -718,8 +705,7 @@ private fun ChatDropdownItems(state: MainToolbarState, callback: MainToolbarCall DropdownMenus.Item( text = { Text( - text = stringResource(R.string.ConversationListFragment__notification_profile), - style = MaterialTheme.typography.bodyLarge + text = stringResource(R.string.ConversationListFragment__notification_profile) ) }, onClick = { diff --git a/app/src/main/java/org/thoughtcrime/securesms/stickers/StickerManagementActivity.kt b/app/src/main/java/org/thoughtcrime/securesms/stickers/StickerManagementActivity.kt index 352f5b3e1b..aaa0c022a7 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/stickers/StickerManagementActivity.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/stickers/StickerManagementActivity.kt @@ -332,12 +332,7 @@ private fun TopAppBar( offsetY = 0.dp ) { DropdownMenus.Item( - text = { - Text( - text = stringResource(R.string.StickerManagement_menu_select_packs), - style = MaterialTheme.typography.bodyLarge - ) - }, + text = { Text(text = stringResource(R.string.StickerManagement_menu_select_packs)) }, onClick = { onSetMultiSelectModeEnabled(true) menuController.hide() diff --git a/app/src/main/java/org/thoughtcrime/securesms/stickers/StickerPackListItems.kt b/app/src/main/java/org/thoughtcrime/securesms/stickers/StickerPackListItems.kt index c2a71a9636..528e23a8d2 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/stickers/StickerPackListItems.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/stickers/StickerPackListItems.kt @@ -388,7 +388,6 @@ private fun MenuItem( ) Text( text = text, - style = MaterialTheme.typography.bodyLarge, modifier = Modifier.padding(horizontal = 16.dp) ) } diff --git a/core-ui/src/main/java/org/signal/core/ui/compose/DropdownMenus.kt b/core-ui/src/main/java/org/signal/core/ui/compose/DropdownMenus.kt index 5d13b3a4bc..1df16acd79 100644 --- a/core-ui/src/main/java/org/signal/core/ui/compose/DropdownMenus.kt +++ b/core-ui/src/main/java/org/signal/core/ui/compose/DropdownMenus.kt @@ -11,8 +11,10 @@ import androidx.compose.foundation.layout.PaddingValues import androidx.compose.foundation.layout.widthIn import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.material3.DropdownMenuItem +import androidx.compose.material3.LocalTextStyle import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.Composable +import androidx.compose.runtime.CompositionLocalProvider import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.remember @@ -69,7 +71,11 @@ object DropdownMenus { ) { DropdownMenuItem( contentPadding = contentPadding, - text = text, + text = { + CompositionLocalProvider(LocalTextStyle provides MaterialTheme.typography.bodyLarge) { + text() + } + }, onClick = onClick, modifier = modifier )