some updates
This commit is contained in:
@@ -6,5 +6,6 @@ data class ThemeConfig(
|
||||
val selectedColorScheme: Int,
|
||||
val amoledDark: Boolean,
|
||||
val enableBlur: Boolean,
|
||||
val enableMultiline: Boolean
|
||||
val enableMultiline: Boolean,
|
||||
val useSystemFont: Boolean
|
||||
)
|
||||
|
||||
@@ -112,7 +112,8 @@ val LocalThemeConfig = compositionLocalOf {
|
||||
selectedColorScheme = 0,
|
||||
amoledDark = false,
|
||||
enableBlur = false,
|
||||
enableMultiline = false
|
||||
enableMultiline = false,
|
||||
useSystemFont = false
|
||||
)
|
||||
}
|
||||
|
||||
@@ -137,6 +138,7 @@ fun AppTheme(
|
||||
useDarkTheme: Boolean = false,
|
||||
useDynamicColors: Boolean = false,
|
||||
useAmoledBackground: Boolean = false,
|
||||
useSystemFont: Boolean = false,
|
||||
selectedColorScheme: Int = 0,
|
||||
content: @Composable () -> Unit
|
||||
) {
|
||||
@@ -165,17 +167,21 @@ fun AppTheme(
|
||||
}
|
||||
}
|
||||
|
||||
val typography = MaterialTheme.typography.copy(
|
||||
displayLarge = MaterialTheme.typography.displayLarge.copy(fontFamily = googleSansFonts),
|
||||
displayMedium = MaterialTheme.typography.displayMedium.copy(fontFamily = googleSansFonts),
|
||||
displaySmall = MaterialTheme.typography.displaySmall.copy(fontFamily = googleSansFonts),
|
||||
headlineLarge = MaterialTheme.typography.headlineLarge.copy(fontFamily = googleSansFonts),
|
||||
headlineMedium = MaterialTheme.typography.headlineMedium.copy(fontFamily = googleSansFonts),
|
||||
headlineSmall = MaterialTheme.typography.headlineSmall.copy(fontFamily = googleSansFonts),
|
||||
bodyLarge = MaterialTheme.typography.bodyLarge.copy(fontFamily = robotoFonts),
|
||||
bodyMedium = MaterialTheme.typography.bodyMedium.copy(fontFamily = robotoFonts),
|
||||
bodySmall = MaterialTheme.typography.bodySmall.copy(fontFamily = robotoFonts)
|
||||
)
|
||||
val typography = if (useSystemFont) {
|
||||
MaterialTheme.typography
|
||||
} else {
|
||||
MaterialTheme.typography.copy(
|
||||
displayLarge = MaterialTheme.typography.displayLarge.copy(fontFamily = googleSansFonts),
|
||||
displayMedium = MaterialTheme.typography.displayMedium.copy(fontFamily = googleSansFonts),
|
||||
displaySmall = MaterialTheme.typography.displaySmall.copy(fontFamily = googleSansFonts),
|
||||
headlineLarge = MaterialTheme.typography.headlineLarge.copy(fontFamily = googleSansFonts),
|
||||
headlineMedium = MaterialTheme.typography.headlineMedium.copy(fontFamily = googleSansFonts),
|
||||
headlineSmall = MaterialTheme.typography.headlineSmall.copy(fontFamily = googleSansFonts),
|
||||
bodyLarge = MaterialTheme.typography.bodyLarge.copy(fontFamily = robotoFonts),
|
||||
bodyMedium = MaterialTheme.typography.bodyMedium.copy(fontFamily = robotoFonts),
|
||||
bodySmall = MaterialTheme.typography.bodySmall.copy(fontFamily = robotoFonts),
|
||||
)
|
||||
}
|
||||
|
||||
val view = LocalView.current
|
||||
if (!view.isInEditMode) {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:fillColor="#ffffff"
|
||||
android:fillType="evenOdd"
|
||||
android:pathData="M19,12.87c0,-0.47 -0.34,-0.85 -0.8,-0.98C16.93,11.54 16,10.38 16,9V4l1,0c0.55,0 1,-0.45 1,-1c0,-0.55 -0.45,-1 -1,-1H7C6.45,2 6,2.45 6,3c0,0.55 0.45,1 1,1l1,0v5c0,1.38 -0.93,2.54 -2.2,2.89C5.34,12.02 5,12.4 5,12.87V13c0,0.55 0.45,1 1,1h4.98L11,21c0,0.55 0.45,1 1,1c0.55,0 1,-0.45 1,-1l-0.02,-7H18c0.55,0 1,-0.45 1,-1V12.87z" />
|
||||
</vector>
|
||||
|
||||
Reference in New Issue
Block a user