style: use correct tokens in DisconnectedScreen

Signed-off-by: Infi <infi@infi.sh>
This commit is contained in:
Infi 2024-11-17 02:12:37 +01:00
parent b8c702f97b
commit dc0edbb917
1 changed files with 9 additions and 12 deletions

View File

@ -1,7 +1,11 @@
package chat.revolt.components.screens.splash package chat.revolt.components.screens.splash
import androidx.compose.foundation.background import androidx.compose.foundation.background
import androidx.compose.foundation.layout.* import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.Button import androidx.compose.material3.Button
import androidx.compose.material3.MaterialTheme import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text import androidx.compose.material3.Text
@ -9,11 +13,9 @@ import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import chat.revolt.R import chat.revolt.R
@Composable @Composable
@ -27,11 +29,8 @@ fun DisconnectedScreen(onRetry: () -> Unit) {
) { ) {
Text( Text(
text = stringResource(R.string.no_connection), text = stringResource(R.string.no_connection),
style = MaterialTheme.typography.displaySmall.copy( style = MaterialTheme.typography.headlineMedium,
fontSize = 30.sp, textAlign = TextAlign.Center,
fontWeight = FontWeight.Black,
textAlign = TextAlign.Center
),
modifier = Modifier modifier = Modifier
.fillMaxWidth() .fillMaxWidth()
) )
@ -39,10 +38,8 @@ fun DisconnectedScreen(onRetry: () -> Unit) {
Text( Text(
text = stringResource(R.string.no_connection_message), text = stringResource(R.string.no_connection_message),
color = MaterialTheme.colorScheme.onBackground.copy(alpha = 0.6f), color = MaterialTheme.colorScheme.onBackground.copy(alpha = 0.6f),
style = MaterialTheme.typography.titleMedium.copy( style = MaterialTheme.typography.bodyLarge,
textAlign = TextAlign.Center, textAlign = TextAlign.Center,
fontWeight = FontWeight.Normal
),
modifier = Modifier modifier = Modifier
.padding(vertical = 10.dp, horizontal = 20.dp) .padding(vertical = 10.dp, horizontal = 20.dp)
.fillMaxWidth() .fillMaxWidth()