Darken the description colors (#3858)

* Darken the description colors

* Restore UpdatesHolder.kt

* Use the same color as the Extensions subtitles
This commit is contained in:
Soitora 2020-10-12 22:59:44 +02:00 committed by GitHub
parent 72d114d46a
commit 9f05d563f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 3 deletions

View File

@ -32,13 +32,19 @@ class ChapterHolder(
} }
// Set correct text color // Set correct text color
val chapterColor = when { val chapterTitleColor = when {
chapter.read -> adapter.readColor chapter.read -> adapter.readColor
chapter.bookmark -> adapter.bookmarkedColor chapter.bookmark -> adapter.bookmarkedColor
else -> adapter.unreadColor else -> adapter.unreadColor
} }
chapter_title.setTextColor(chapterColor) chapter_title.setTextColor(chapterTitleColor)
chapter_description.setTextColor(chapterColor)
val chapterDescriptionColor = when {
chapter.read -> adapter.readColor
chapter.bookmark -> adapter.bookmarkedColor
else -> adapter.unreadColorSecondary
}
chapter_description.setTextColor(chapterDescriptionColor)
bookmark_icon.isVisible = chapter.bookmark bookmark_icon.isVisible = chapter.bookmark

View File

@ -22,6 +22,7 @@ class ChaptersAdapter(
val readColor = context.getResourceColor(R.attr.colorOnSurface, 0.38f) val readColor = context.getResourceColor(R.attr.colorOnSurface, 0.38f)
val unreadColor = context.getResourceColor(R.attr.colorOnSurface) val unreadColor = context.getResourceColor(R.attr.colorOnSurface)
val unreadColorSecondary = context.getResourceColor(android.R.attr.textColorSecondary)
val bookmarkedColor = context.getResourceColor(R.attr.colorAccent) val bookmarkedColor = context.getResourceColor(R.attr.colorAccent)