Add tertiary badge in appearance preview (closes #5867)

This commit is contained in:
arkon
2021-11-19 17:39:30 -05:00
parent 230fa76d57
commit 430ff80198
2 changed files with 21 additions and 7 deletions

View File

@ -54,6 +54,9 @@ class ThemesPreferenceAdapter(private val clickListener: OnItemClickListener) :
fun bind(appTheme: PreferenceValues.AppTheme) {
binding.name.text = view.context.getString(appTheme.titleResId!!)
// For rounded corners
binding.badges.clipToOutline = true
val isSelected = preferences.appTheme().get() == appTheme
binding.themeCard.isChecked = isSelected
binding.themeCard.strokeColor = if (isSelected) selectedColor else unselectedColor