fix: update title styles (screens, dialog, bottom sheets) (#827)

This commit is contained in:
Diego Beraldin 2024-05-11 08:41:01 +02:00 committed by GitHub
parent eaff49d31e
commit f3dc42c14e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
39 changed files with 50 additions and 26 deletions

View File

@ -37,8 +37,8 @@ fun BottomSheetHeader(
), ),
text = title, text = title,
textAlign = TextAlign.Center, textAlign = TextAlign.Center,
style = MaterialTheme.typography.titleLarge,
color = MaterialTheme.colorScheme.onBackground, color = MaterialTheme.colorScheme.onBackground,
style = MaterialTheme.typography.titleMedium,
) )
} }
} }

View File

@ -73,7 +73,7 @@ fun EditFormattedInfoDialog(
) { ) {
Text( Text(
text = LocalXmlStrings.current.postActionEdit, text = LocalXmlStrings.current.postActionEdit,
style = MaterialTheme.typography.titleLarge, style = MaterialTheme.typography.titleMedium,
color = MaterialTheme.colorScheme.onBackground, color = MaterialTheme.colorScheme.onBackground,
) )
Spacer(modifier = Modifier.height(Spacing.s)) Spacer(modifier = Modifier.height(Spacing.s))
@ -103,8 +103,8 @@ fun EditFormattedInfoDialog(
TextFormattingBar( TextFormattingBar(
modifier = Modifier.padding( modifier = Modifier.padding(
top = Spacing.s, top = Spacing.s,
start = Spacing.m, start = Spacing.s,
end = Spacing.m, end = Spacing.s,
), ),
textFieldValue = textFieldValue, textFieldValue = textFieldValue,
onTextFieldValueChanged = { onTextFieldValueChanged = {

View File

@ -61,7 +61,7 @@ fun EditTextualInfoDialog(
) { ) {
Text( Text(
text = LocalXmlStrings.current.postActionEdit, text = LocalXmlStrings.current.postActionEdit,
style = MaterialTheme.typography.titleLarge, style = MaterialTheme.typography.titleMedium,
color = MaterialTheme.colorScheme.onBackground, color = MaterialTheme.colorScheme.onBackground,
) )
Spacer(modifier = Modifier.height(Spacing.s)) Spacer(modifier = Modifier.height(Spacing.s))

View File

@ -52,7 +52,7 @@ fun NumberPickerDialog(
) { ) {
Text( Text(
text = title, text = title,
style = MaterialTheme.typography.titleLarge, style = MaterialTheme.typography.titleMedium,
color = MaterialTheme.colorScheme.onBackground, color = MaterialTheme.colorScheme.onBackground,
) )
Spacer(modifier = Modifier.height(Spacing.s)) Spacer(modifier = Modifier.height(Spacing.s))

View File

@ -45,7 +45,7 @@ fun SelectLanguageDialog(
) { ) {
Text( Text(
text = LocalXmlStrings.current.settingsLanguage, text = LocalXmlStrings.current.settingsLanguage,
style = MaterialTheme.typography.titleLarge, style = MaterialTheme.typography.titleMedium,
color = MaterialTheme.colorScheme.onBackground, color = MaterialTheme.colorScheme.onBackground,
) )
Spacer(modifier = Modifier.height(Spacing.xs)) Spacer(modifier = Modifier.height(Spacing.xs))

View File

@ -182,6 +182,7 @@ internal object ProfileMainScreen : Tab {
Text( Text(
modifier = Modifier.padding(horizontal = Spacing.s), modifier = Modifier.padding(horizontal = Spacing.s),
text = LocalXmlStrings.current.navigationProfile, text = LocalXmlStrings.current.navigationProfile,
style = MaterialTheme.typography.titleMedium,
) )
}, },
actions = { actions = {
@ -262,7 +263,10 @@ internal object ProfileMainScreen : Tab {
logoutConfirmDialogOpen = false logoutConfirmDialogOpen = false
}, },
title = { title = {
Text(text = LocalXmlStrings.current.actionLogout) Text(
text = LocalXmlStrings.current.actionLogout,
style = MaterialTheme.typography.titleMedium,
)
}, },
text = { text = {
Text(text = LocalXmlStrings.current.messageAreYouSure) Text(text = LocalXmlStrings.current.messageAreYouSure)

View File

@ -120,6 +120,7 @@ class AdvancedSettingsScreen : Screen {
Text( Text(
modifier = Modifier.padding(horizontal = Spacing.s), modifier = Modifier.padding(horizontal = Spacing.s),
text = LocalXmlStrings.current.settingsAdvanced, text = LocalXmlStrings.current.settingsAdvanced,
style = MaterialTheme.typography.titleMedium,
) )
}, },
navigationIcon = { navigationIcon = {

View File

@ -97,6 +97,7 @@ class SettingsColorAndFontScreen : Screen {
Text( Text(
modifier = Modifier.padding(horizontal = Spacing.s), modifier = Modifier.padding(horizontal = Spacing.s),
text = LocalXmlStrings.current.settingsColorsAndFonts, text = LocalXmlStrings.current.settingsColorsAndFonts,
style = MaterialTheme.typography.titleMedium,
) )
}, },
navigationIcon = { navigationIcon = {

View File

@ -134,6 +134,7 @@ class SettingsScreen : Screen {
Text( Text(
modifier = Modifier.padding(horizontal = Spacing.s), modifier = Modifier.padding(horizontal = Spacing.s),
text = LocalXmlStrings.current.navigationSettings, text = LocalXmlStrings.current.navigationSettings,
style = MaterialTheme.typography.titleMedium,
) )
}, },
) )

View File

@ -74,7 +74,7 @@ class AboutDialog : Screen {
) { ) {
Text( Text(
text = LocalXmlStrings.current.settingsAbout, text = LocalXmlStrings.current.settingsAbout,
style = MaterialTheme.typography.titleLarge, style = MaterialTheme.typography.titleMedium,
color = MaterialTheme.colorScheme.onBackground, color = MaterialTheme.colorScheme.onBackground,
) )
Spacer(modifier = Modifier.height(Spacing.s)) Spacer(modifier = Modifier.height(Spacing.s))

View File

@ -146,6 +146,7 @@ class AccountSettingsScreen : Screen {
Text( Text(
modifier = Modifier.padding(horizontal = Spacing.s), modifier = Modifier.padding(horizontal = Spacing.s),
text = LocalXmlStrings.current.settingsWebPreferences, text = LocalXmlStrings.current.settingsWebPreferences,
style = MaterialTheme.typography.titleMedium,
) )
}, },
navigationIcon = { navigationIcon = {

View File

@ -123,6 +123,7 @@ class BanUserScreen(
Text( Text(
text = title, text = title,
color = MaterialTheme.colorScheme.onBackground, color = MaterialTheme.colorScheme.onBackground,
style = MaterialTheme.typography.titleMedium,
) )
}, },
actions = { actions = {

View File

@ -152,6 +152,7 @@ class InboxChatScreen(
text = uiState.otherUserName, text = uiState.otherUserName,
maxLines = 1, maxLines = 1,
overflow = TextOverflow.Ellipsis, overflow = TextOverflow.Ellipsis,
style = MaterialTheme.typography.titleMedium,
) )
} }
}, },

View File

@ -53,7 +53,7 @@ fun ColorPickerDialog(
) { ) {
Text( Text(
text = LocalXmlStrings.current.settingsColorDialogTitle, text = LocalXmlStrings.current.settingsColorDialogTitle,
style = MaterialTheme.typography.titleLarge, style = MaterialTheme.typography.titleMedium,
color = MaterialTheme.colorScheme.onBackground, color = MaterialTheme.colorScheme.onBackground,
) )
Spacer(modifier = Modifier.height(Spacing.xs)) Spacer(modifier = Modifier.height(Spacing.xs))

View File

@ -71,7 +71,7 @@ class FontScaleBottomSheet(
end = Spacing.s, end = Spacing.s,
), ),
text = title, text = title,
style = MaterialTheme.typography.titleLarge, style = MaterialTheme.typography.titleMedium,
color = MaterialTheme.colorScheme.onBackground, color = MaterialTheme.colorScheme.onBackground,
) )
Column( Column(

View File

@ -277,6 +277,7 @@ class CommunityDetailScreen(
text = uiState.community.readableName(uiState.preferNicknames), text = uiState.community.readableName(uiState.preferNicknames),
maxLines = 1, maxLines = 1,
overflow = TextOverflow.Ellipsis, overflow = TextOverflow.Ellipsis,
style = MaterialTheme.typography.titleMedium,
) )
}, },
actions = { actions = {

View File

@ -88,7 +88,7 @@ class CommunityInfoScreen(
title = { title = {
Text( Text(
text = title, text = title,
style = MaterialTheme.typography.bodyLarge, style = MaterialTheme.typography.titleMedium,
color = MaterialTheme.colorScheme.onBackground, color = MaterialTheme.colorScheme.onBackground,
) )
}, },

View File

@ -75,6 +75,7 @@ class ConfigureContentViewScreen : Screen {
Text( Text(
modifier = Modifier.padding(horizontal = Spacing.s), modifier = Modifier.padding(horizontal = Spacing.s),
text = LocalXmlStrings.current.settingsConfigureContent, text = LocalXmlStrings.current.settingsConfigureContent,
style = MaterialTheme.typography.titleMedium,
) )
}, },
navigationIcon = { navigationIcon = {

View File

@ -77,6 +77,7 @@ class ConfigureSwipeActionsScreen : Screen {
Text( Text(
modifier = Modifier.padding(horizontal = Spacing.s), modifier = Modifier.padding(horizontal = Spacing.s),
text = LocalXmlStrings.current.settingsConfigureSwipeActions, text = LocalXmlStrings.current.settingsConfigureSwipeActions,
style = MaterialTheme.typography.titleMedium,
) )
}, },
navigationIcon = { navigationIcon = {

View File

@ -188,6 +188,7 @@ class CreateCommentScreen(
} }
}, },
color = MaterialTheme.colorScheme.onBackground, color = MaterialTheme.colorScheme.onBackground,
style = MaterialTheme.typography.titleMedium,
) )
}, },
actions = { actions = {
@ -326,8 +327,8 @@ class CreateCommentScreen(
TextFormattingBar( TextFormattingBar(
modifier = Modifier.padding( modifier = Modifier.padding(
top = Spacing.s, top = Spacing.s,
start = Spacing.m, start = Spacing.s,
end = Spacing.m, end = Spacing.s,
), ),
textFieldValue = uiState.textValue, textFieldValue = uiState.textValue,
onTextFieldValueChanged = { value -> onTextFieldValueChanged = { value ->

View File

@ -252,6 +252,7 @@ class CreatePostScreen(
else -> LocalXmlStrings.current.createPostTitle else -> LocalXmlStrings.current.createPostTitle
}, },
color = MaterialTheme.colorScheme.onBackground, color = MaterialTheme.colorScheme.onBackground,
style = MaterialTheme.typography.titleMedium,
) )
}, },
actions = { actions = {
@ -510,8 +511,8 @@ class CreatePostScreen(
TextFormattingBar( TextFormattingBar(
modifier = Modifier.padding( modifier = Modifier.padding(
top = Spacing.s, top = Spacing.s,
start = Spacing.m, start = Spacing.s,
end = Spacing.m, end = Spacing.s,
), ),
textFieldValue = uiState.bodyValue, textFieldValue = uiState.bodyValue,
onTextFieldValueChanged = { value -> onTextFieldValueChanged = { value ->

View File

@ -113,6 +113,7 @@ class CreateReportScreen(
Text( Text(
text = title, text = title,
color = MaterialTheme.colorScheme.onBackground, color = MaterialTheme.colorScheme.onBackground,
style = MaterialTheme.typography.titleMedium,
) )
}, },
actions = { actions = {

View File

@ -26,7 +26,6 @@ import com.github.diegoberaldin.raccoonforlemmy.core.commonui.components.CustomI
import com.github.diegoberaldin.raccoonforlemmy.core.commonui.components.PlaceholderImage import com.github.diegoberaldin.raccoonforlemmy.core.commonui.components.PlaceholderImage
import com.github.diegoberaldin.raccoonforlemmy.core.l10n.LocalXmlStrings import com.github.diegoberaldin.raccoonforlemmy.core.l10n.LocalXmlStrings
import com.github.diegoberaldin.raccoonforlemmy.core.utils.compose.onClick import com.github.diegoberaldin.raccoonforlemmy.core.utils.compose.onClick
import com.github.diegoberaldin.raccoonforlemmy.core.utils.compose.rememberCallback
import com.github.diegoberaldin.raccoonforlemmy.domain.lemmy.data.UserModel import com.github.diegoberaldin.raccoonforlemmy.domain.lemmy.data.UserModel
@Composable @Composable
@ -82,7 +81,7 @@ internal fun DrawerHeader(
append(user.name) append(user.name)
} }
}, },
style = MaterialTheme.typography.titleLarge, style = MaterialTheme.typography.titleMedium,
color = fullColor, color = fullColor,
) )
Text( Text(
@ -119,7 +118,7 @@ internal fun DrawerHeader(
) { ) {
Text( Text(
text = anonymousTitle, text = anonymousTitle,
style = MaterialTheme.typography.titleLarge, style = MaterialTheme.typography.titleMedium,
color = fullColor, color = fullColor,
) )
Row { Row {

View File

@ -148,6 +148,7 @@ class EditCommunityScreen(
append(" ") append(" ")
append(uiState.title) append(uiState.title)
}, },
style = MaterialTheme.typography.titleMedium,
) )
}, },
navigationIcon = { navigationIcon = {

View File

@ -109,8 +109,8 @@ class InstanceInfoScreen(
title = { title = {
Text( Text(
text = LocalXmlStrings.current.instanceDetailTitle(instanceName), text = LocalXmlStrings.current.instanceDetailTitle(instanceName),
style = MaterialTheme.typography.bodyLarge,
color = MaterialTheme.colorScheme.onBackground, color = MaterialTheme.colorScheme.onBackground,
style = MaterialTheme.typography.titleMedium,
) )
}, },
actions = { actions = {

View File

@ -34,7 +34,6 @@ import com.github.diegoberaldin.raccoonforlemmy.core.l10n.LocalXmlStrings
import com.github.diegoberaldin.raccoonforlemmy.core.navigation.di.getNavigationCoordinator import com.github.diegoberaldin.raccoonforlemmy.core.navigation.di.getNavigationCoordinator
import com.github.diegoberaldin.raccoonforlemmy.core.persistence.di.getSettingsRepository import com.github.diegoberaldin.raccoonforlemmy.core.persistence.di.getSettingsRepository
import com.github.diegoberaldin.raccoonforlemmy.core.utils.compose.onClick import com.github.diegoberaldin.raccoonforlemmy.core.utils.compose.onClick
import com.github.diegoberaldin.raccoonforlemmy.core.utils.compose.rememberCallback
import com.github.diegoberaldin.raccoonforlemmy.core.utils.url.getCustomTabsHelper import com.github.diegoberaldin.raccoonforlemmy.core.utils.url.getCustomTabsHelper
import com.github.diegoberaldin.raccoonforlemmy.core.utils.url.toUrlOpeningMode import com.github.diegoberaldin.raccoonforlemmy.core.utils.url.toUrlOpeningMode
import com.github.diegoberaldin.raccoonforlemmy.unit.licences.components.LicenceItem import com.github.diegoberaldin.raccoonforlemmy.unit.licences.components.LicenceItem
@ -65,6 +64,7 @@ class LicencesScreen : Screen {
Text( Text(
modifier = Modifier.padding(horizontal = Spacing.s), modifier = Modifier.padding(horizontal = Spacing.s),
text = LocalXmlStrings.current.settingsAboutLicences, text = LocalXmlStrings.current.settingsAboutLicences,
style = MaterialTheme.typography.titleMedium,
) )
}, },
navigationIcon = { navigationIcon = {

View File

@ -119,6 +119,7 @@ class LoginBottomSheet : Screen {
Text( Text(
text = LocalXmlStrings.current.profileButtonLogin, text = LocalXmlStrings.current.profileButtonLogin,
color = MaterialTheme.colorScheme.onBackground, color = MaterialTheme.colorScheme.onBackground,
style = MaterialTheme.typography.titleMedium,
) )
}, },
navigationIcon = { navigationIcon = {

View File

@ -73,6 +73,7 @@ class ManageBanScreen : Screen {
Text( Text(
modifier = Modifier.padding(horizontal = Spacing.s), modifier = Modifier.padding(horizontal = Spacing.s),
text = LocalXmlStrings.current.settingsManageBan, text = LocalXmlStrings.current.settingsManageBan,
style = MaterialTheme.typography.titleMedium,
) )
}, },
navigationIcon = { navigationIcon = {

View File

@ -136,7 +136,7 @@ class ManageSubscriptionsScreen : Screen {
Text( Text(
modifier = Modifier.padding(horizontal = Spacing.s), modifier = Modifier.padding(horizontal = Spacing.s),
text = LocalXmlStrings.current.navigationDrawerTitleSubscriptions, text = LocalXmlStrings.current.navigationDrawerTitleSubscriptions,
style = MaterialTheme.typography.titleMedium style = MaterialTheme.typography.titleMedium,
) )
}, },
scrollBehavior = scrollBehavior, scrollBehavior = scrollBehavior,

View File

@ -164,6 +164,7 @@ class MultiCommunityScreen(
text = uiState.community.name, text = uiState.community.name,
maxLines = 1, maxLines = 1,
overflow = TextOverflow.Ellipsis, overflow = TextOverflow.Ellipsis,
style = MaterialTheme.typography.titleMedium,
) )
}, },
scrollBehavior = scrollBehavior, scrollBehavior = scrollBehavior,

View File

@ -95,6 +95,7 @@ class MultiCommunityEditorScreen(
Text( Text(
text = LocalXmlStrings.current.multiCommunityEditorTitle, text = LocalXmlStrings.current.multiCommunityEditorTitle,
color = MaterialTheme.colorScheme.onBackground, color = MaterialTheme.colorScheme.onBackground,
style = MaterialTheme.typography.titleMedium,
) )
}, },
navigationIcon = { navigationIcon = {

View File

@ -298,6 +298,7 @@ class PostDetailScreen(
text = uiState.post.title, text = uiState.post.title,
maxLines = 1, maxLines = 1,
overflow = TextOverflow.Ellipsis, overflow = TextOverflow.Ellipsis,
style = MaterialTheme.typography.titleMedium,
) )
}, },
actions = { actions = {

View File

@ -78,7 +78,7 @@ fun RawContentDialog(
) { ) {
Text( Text(
text = LocalXmlStrings.current.dialogTitleRawContent, text = LocalXmlStrings.current.dialogTitleRawContent,
style = MaterialTheme.typography.titleLarge, style = MaterialTheme.typography.titleMedium,
color = fullColor, color = fullColor,
) )
Spacer(modifier = Modifier.height(Spacing.s)) Spacer(modifier = Modifier.height(Spacing.s))

View File

@ -109,6 +109,7 @@ class RemoveScreen(
Text( Text(
text = LocalXmlStrings.current.modActionRemove, text = LocalXmlStrings.current.modActionRemove,
color = MaterialTheme.colorScheme.onBackground, color = MaterialTheme.colorScheme.onBackground,
style = MaterialTheme.typography.titleMedium,
) )
}, },
actions = { actions = {

View File

@ -106,6 +106,7 @@ class SavedItemsScreen : Screen {
Text( Text(
modifier = Modifier.padding(horizontal = Spacing.s), modifier = Modifier.padding(horizontal = Spacing.s),
text = LocalXmlStrings.current.navigationDrawerTitleBookmarks, text = LocalXmlStrings.current.navigationDrawerTitleBookmarks,
style = MaterialTheme.typography.titleMedium,
) )
}, },
actions = { actions = {

View File

@ -68,7 +68,7 @@ class SelectCommunityDialog : Screen {
) { ) {
Text( Text(
text = LocalXmlStrings.current.dialogTitleSelectCommunity, text = LocalXmlStrings.current.dialogTitleSelectCommunity,
style = MaterialTheme.typography.titleLarge, style = MaterialTheme.typography.titleMedium,
color = MaterialTheme.colorScheme.onBackground, color = MaterialTheme.colorScheme.onBackground,
) )
Spacer(modifier = Modifier.height(Spacing.s)) Spacer(modifier = Modifier.height(Spacing.s))

View File

@ -55,7 +55,7 @@ internal fun ChangeInstanceDialog(
) { ) {
Text( Text(
text = LocalXmlStrings.current.dialogTitleAddInstance, text = LocalXmlStrings.current.dialogTitleAddInstance,
style = MaterialTheme.typography.titleLarge, style = MaterialTheme.typography.titleMedium,
color = MaterialTheme.colorScheme.onBackground, color = MaterialTheme.colorScheme.onBackground,
) )
TextField( TextField(

View File

@ -218,6 +218,7 @@ class UserDetailScreen(
text = userName, text = userName,
maxLines = 1, maxLines = 1,
overflow = TextOverflow.Ellipsis, overflow = TextOverflow.Ellipsis,
style = MaterialTheme.typography.titleMedium,
) )
}, },
actions = { actions = {

View File

@ -92,7 +92,7 @@ class UserInfoScreen(
title = { title = {
Text( Text(
text = title, text = title,
style = MaterialTheme.typography.bodyLarge, style = MaterialTheme.typography.titleMedium,
color = MaterialTheme.colorScheme.onBackground, color = MaterialTheme.colorScheme.onBackground,
) )
}, },