use default font for titles

This commit is contained in:
Helium314 2025-05-01 20:27:56 +02:00
parent 875491a0e1
commit 2a7ac3cf79
2 changed files with 4 additions and 18 deletions

View file

@ -12,9 +12,6 @@ import androidx.compose.material3.lightColorScheme
import androidx.compose.runtime.Composable
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.colorResource
import androidx.compose.ui.text.font.DeviceFontFamilyName
import androidx.compose.ui.text.font.Font
import androidx.compose.ui.text.font.FontFamily
import androidx.compose.ui.text.font.FontWeight
import helium314.keyboard.latin.R
@ -36,20 +33,9 @@ fun Theme(dark: Boolean = isSystemInDarkTheme(), content: @Composable () -> Unit
MaterialTheme(
colorScheme = colorScheme,
typography = Typography(
headlineMedium = material3.headlineMedium.copy(fontWeight = FontWeight.Bold),
headlineSmall = material3.headlineSmall.copy(fontWeight = FontWeight.Bold),
titleLarge = material3.titleLarge.copy(
fontWeight = FontWeight.Bold,
fontFamily = FontFamily(Font(DeviceFontFamilyName("sans-serif-condensed"), FontWeight.Bold))
),
titleMedium = material3.titleMedium.copy(
fontWeight = FontWeight.Bold,
fontFamily = FontFamily(Font(DeviceFontFamilyName("sans-serif-condensed"), FontWeight.Bold))
),
titleSmall = material3.titleSmall.copy(
fontWeight = FontWeight.Bold,
fontFamily = FontFamily(Font(DeviceFontFamilyName("sans-serif-condensed"), FontWeight.Bold))
)
titleLarge = material3.titleLarge.copy(fontWeight = FontWeight.Bold),
titleMedium = material3.titleMedium.copy(fontWeight = FontWeight.Bold),
titleSmall = material3.titleSmall.copy(fontWeight = FontWeight.Bold)
),
//shapes = Shapes(),
content = content

View file

@ -64,7 +64,7 @@ fun ThreeButtonAlertDialog(
bottom = if (reducePadding) 2.dp else 6.dp
)) {
title?.let {
CompositionLocalProvider(LocalTextStyle provides MaterialTheme.typography.titleLarge) {
CompositionLocalProvider(LocalTextStyle provides MaterialTheme.typography.titleMedium) {
Box(Modifier.padding(PaddingValues(bottom = if (reducePadding) 4.dp else 16.dp))) {
title()
}