Skip to content
This repository has been archived by the owner on Sep 29, 2024. It is now read-only.

Commit

Permalink
Fix SiteFirewallBypassController title color on light themes.
Browse files Browse the repository at this point in the history
  • Loading branch information
K1rakishou committed Mar 13, 2024
1 parent 9064fa8 commit 31b2495
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@ class SiteFirewallBypassController(
)

closeButton.setImageDrawable(tintedDrawable)

val textColor = ThemeEngine.resolveTextColor(themeEngine.chanTheme)
headerTitle.setTextColor(textColor)
}

@SuppressLint("SetJavaScriptEnabled")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,15 @@ open class ThemeEngine(
val LIGHT_DRAWABLE_TINT_COMPOSE = ComposeColor(Color.parseColor("#EEEEEE"))
val DARK_DRAWABLE_TINT_COMPOSE = ComposeColor(Color.parseColor("#7E7E7E"))

@JvmStatic
fun resolveTextColor(chanTheme: ChanTheme): Int {
return if (chanTheme.isBackColorDark) {
Color.WHITE
} else {
Color.BLACK
}
}

@JvmStatic
fun resolveDrawableTintColor(chanTheme: ChanTheme): Int {
return if (chanTheme.isBackColorDark) {
Expand Down

0 comments on commit 31b2495

Please sign in to comment.