From b11e98ffe79f9f2c0ed72d834116c421484883ea Mon Sep 17 00:00:00 2001 From: Gibran Chevalley Date: Thu, 25 Jul 2024 10:22:36 +0200 Subject: [PATCH] Set default text style for Text composables --- .../java/com/infomaniak/swisstransfer/ui/theme/Theme.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/theme/Theme.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/theme/Theme.kt index 7efe104a7..a4d8e4547 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/theme/Theme.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/theme/Theme.kt @@ -19,6 +19,7 @@ package com.infomaniak.swisstransfer.ui.theme import androidx.compose.foundation.isSystemInDarkTheme +import androidx.compose.material3.LocalTextStyle import androidx.compose.material3.MaterialTheme import androidx.compose.material3.darkColorScheme import androidx.compose.material3.lightColorScheme @@ -45,7 +46,10 @@ fun SwissTransferTheme( darkTheme: Boolean = isSystemInDarkTheme(), content: @Composable () -> Unit, ) { - CompositionLocalProvider(LocalCustomTypography provides Typography) { + CompositionLocalProvider( + LocalCustomTypography provides Typography, + LocalTextStyle provides SwissTransferTheme.typography.bodyRegular, + ) { MaterialTheme( colorScheme = if (darkTheme) DarkColorScheme else LightColorScheme, shapes = Shapes,