Themed icons: swap colors in dark mode

This commit is contained in:
MM20 2021-12-07 17:52:45 +01:00
parent 73d65d1a30
commit be0ea2cfe6
No known key found for this signature in database
GPG Key ID: 0B61A8F2DEAFA389
2 changed files with 4 additions and 4 deletions

View File

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

View File

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