android, desktop: specifying text color globally (#3635)
* android, desktop: specifying text color globally * typography
This commit is contained in:
committed by
GitHub
parent
e6b5727003
commit
f758a5526a
@@ -6,6 +6,7 @@ import androidx.compose.runtime.*
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.geometry.Offset
|
||||
import androidx.compose.ui.graphics.*
|
||||
import androidx.compose.ui.text.TextStyle
|
||||
import androidx.compose.ui.unit.dp
|
||||
import chat.simplex.common.model.ChatController
|
||||
import chat.simplex.common.platform.isInNightMode
|
||||
@@ -282,8 +283,27 @@ fun SimpleXTheme(darkTheme: Boolean? = null, content: @Composable () -> Unit) {
|
||||
val theme by CurrentColors.collectAsState()
|
||||
MaterialTheme(
|
||||
colors = theme.colors,
|
||||
typography = Typography,
|
||||
typography = Typography.copy(
|
||||
h1 = Typography.h1.copy(color = theme.colors.onBackground),
|
||||
h2 = Typography.h2.copy(color = theme.colors.onBackground),
|
||||
h3 = Typography.h3.copy(color = theme.colors.onBackground),
|
||||
h4 = Typography.h4.copy(color = theme.colors.onBackground),
|
||||
h5 = Typography.h5.copy(color = theme.colors.onBackground),
|
||||
h6 = Typography.h6.copy(color = theme.colors.onBackground),
|
||||
subtitle1 = Typography.subtitle1.copy(color = theme.colors.onBackground),
|
||||
subtitle2 = Typography.subtitle2.copy(color = theme.colors.onBackground),
|
||||
body1 = Typography.body1.copy(color = theme.colors.onBackground),
|
||||
body2 = Typography.body2.copy(color = theme.colors.onBackground),
|
||||
button = Typography.button.copy(color = theme.colors.onBackground),
|
||||
caption = Typography.caption.copy(color = theme.colors.onBackground),
|
||||
overline = Typography.overline.copy(color = theme.colors.onBackground)
|
||||
),
|
||||
shapes = Shapes,
|
||||
content = content
|
||||
content = {
|
||||
ProvideTextStyle(
|
||||
value = TextStyle(color = theme.colors.onBackground),
|
||||
content = content
|
||||
)
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user