Fix divider color

This commit is contained in:
andrew 2023-07-03 20:40:16 +09:30
parent 70e63a23bc
commit 0fcd997290
1 changed files with 3 additions and 3 deletions

View File

@ -19,8 +19,8 @@ data class ExtraColors(
val settingsBackground: Color, val settingsBackground: Color,
) )
fun Context.getColorFromTheme(@AttrRes attr: Int): Color = fun Context.getColorFromTheme(@AttrRes attr: Int, defaultValue: Int = 0x0): Color =
MaterialColors.getColor(this, attr, 0).let(::Color) MaterialColors.getColor(this, attr, defaultValue).let(::Color)
@Composable @Composable
fun AppTheme( fun AppTheme(
@ -29,7 +29,7 @@ fun AppTheme(
val extraColors = LocalContext.current.run { val extraColors = LocalContext.current.run {
ExtraColors( ExtraColors(
cell = getColorFromTheme(R.attr.colorCellBackground), cell = getColorFromTheme(R.attr.colorCellBackground),
divider = getColorFromTheme(R.attr.dividerColor), divider = getColorFromTheme(R.attr.dividerHorizontal),
settingsBackground = getColorFromTheme(R.attr.colorSettingsBackground) settingsBackground = getColorFromTheme(R.attr.colorSettingsBackground)
) )
} }