Tweak themed icon colors

This commit is contained in:
MM20 2022-02-14 22:49:06 +01:00
parent 665664df70
commit 2665df2fff
No known key found for this signature in database
GPG Key ID: 0B61A8F2DEAFA389
2 changed files with 5 additions and 6 deletions

View File

@ -29,9 +29,8 @@ class ThemedIconProvider(
val isDarkMode =
context.resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_YES != 0
val bgAttr =
if (isDarkMode) R.attr.colorOnSurfaceInverse else R.attr.colorPrimaryContainer
val fgAttr = if (isDarkMode) R.attr.colorOnPrimaryContainer else R.attr.colorOnSurfaceVariant
val bgAttr = R.attr.colorPrimaryContainer
val fgAttr = R.attr.colorOnPrimaryContainer
bgColor = theme.resolveAttribute(bgAttr, typedValue, true).let {
typedValue.data
}

View File

@ -21,9 +21,9 @@ class ThemedPlaceholderIconProvider(
val isDarkMode =
context.resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_YES != 0
val bgAttr =
if (isDarkMode) R.attr.colorOnSurfaceInverse else R.attr.colorPrimaryContainer
val fgAttr = if (isDarkMode) R.attr.colorOnPrimaryContainer else R.attr.colorOnSurfaceVariant
val bgAttr = R.attr.colorPrimaryContainer
val fgAttr = R.attr.colorOnPrimaryContainer
bgColor = theme.resolveAttribute(bgAttr, typedValue, true).let {
typedValue.data
}