More themes cleanup (#5410)

* More themes cleanup

* Tweak some things

* Fix 'Clear History' icon

* Split out ripple colored to its own drawable

* Tidy up things

* Unify background dim amount

* Use primaryColor for Account login button

* More colored ripples

* use colorOnPrimary for selected comfortable library item title

Co-authored-by: Soitora <simon.mattila@protonmail.com>
This commit is contained in:
Ivan Iskandar
2021-06-20 02:45:16 +07:00
committed by GitHub
parent 05771ddf6d
commit 932c92412c
108 changed files with 556 additions and 882 deletions

View File

@@ -101,12 +101,13 @@ abstract class SettingsController : PreferenceController() {
private fun animatePreferenceHighlight(view: View) {
val origBackground = view.background
ValueAnimator
.ofObject(ArgbEvaluator(), Color.TRANSPARENT, view.context.getResourceColor(R.attr.rippleColor))
.ofObject(ArgbEvaluator(), Color.TRANSPARENT, view.context.getResourceColor(R.attr.colorControlHighlight))
.apply {
duration = 500L
repeatCount = 2
duration = 200L
repeatCount = 5
repeatMode = ValueAnimator.REVERSE
addUpdateListener { animator -> view.setBackgroundColor(animator.animatedValue as Int) }
reverse()
start()
}
.doOnEnd {
// Restore original ripple

View File

@@ -157,7 +157,7 @@ class WebViewActivity : BaseViewBindingActivity<WebviewActivityBinding>() {
backItem?.isEnabled = binding.webview.canGoBack()
forwardItem?.isEnabled = binding.webview.canGoForward()
val iconTintColor = getResourceColor(R.attr.colorOnPrimary)
val iconTintColor = getResourceColor(R.attr.colorOnToolbar)
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)