mirror of
https://github.com/mihonapp/mihon.git
synced 2025-11-12 20:19:05 +01:00
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:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user