From e5e14e1f9ea0903055efedd7f3e869624a69521c Mon Sep 17 00:00:00 2001 From: arkon Date: Fri, 10 Apr 2020 14:09:08 -0400 Subject: [PATCH] Fix invisible back/forward webview icons in white them --- .../eu/kanade/tachiyomi/ui/webview/WebViewActivity.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/webview/WebViewActivity.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/webview/WebViewActivity.kt index 36c0fcd1a..e650db77c 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/webview/WebViewActivity.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/webview/WebViewActivity.kt @@ -4,7 +4,6 @@ import android.annotation.SuppressLint import android.content.Context import android.content.Intent import android.graphics.Bitmap -import android.graphics.Color import android.os.Bundle import android.view.Menu import android.view.MenuItem @@ -123,9 +122,10 @@ class WebViewActivity : BaseActivity() { backItem?.isEnabled = binding.webview.canGoBack() forwardItem?.isEnabled = binding.webview.canGoForward() - val translucentWhite = ColorUtils.setAlphaComponent(Color.WHITE, 127) - backItem.icon?.setTint(if (binding.webview.canGoBack()) Color.WHITE else translucentWhite) - forwardItem?.icon?.setTint(if (binding.webview.canGoForward()) Color.WHITE else translucentWhite) + val iconTintColor = getResourceColor(R.attr.colorOnSurface) + val translucentIconTintColor = ColorUtils.setAlphaComponent(iconTintColor, 127) + backItem.icon?.setTint(if (binding.webview.canGoBack()) iconTintColor else translucentIconTintColor) + forwardItem?.icon?.setTint(if (binding.webview.canGoForward()) iconTintColor else translucentIconTintColor) return super.onPrepareOptionsMenu(menu) }