From c4862cfb57276cad68578371057cbc987b42e72c Mon Sep 17 00:00:00 2001 From: gedoor Date: Sun, 2 Jun 2019 19:56:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/io/legado/app/lib/theme/TintHelper.kt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/io/legado/app/lib/theme/TintHelper.kt b/app/src/main/java/io/legado/app/lib/theme/TintHelper.kt index e6a0904ef..dd727063a 100644 --- a/app/src/main/java/io/legado/app/lib/theme/TintHelper.kt +++ b/app/src/main/java/io/legado/app/lib/theme/TintHelper.kt @@ -125,16 +125,16 @@ object TintHelper { fun setTintAuto( view: View, @ColorInt color: Int, - background: Boolean + isBackground: Boolean ) { - setTintAuto(view, color, background, ATHUtils.isWindowBackgroundDark(view.context)) + setTintAuto(view, color, isBackground, ATHUtils.isWindowBackgroundDark(view.context)) } fun setTintAuto( view: View, @ColorInt color: Int, - background: Boolean, isDark: Boolean + isBackground: Boolean, isDark: Boolean ) { - var isBg = background + var isBg = isBackground if (!isBg) { when (view) { is RadioButton -> setTint(view, color, isDark) @@ -180,7 +180,7 @@ object TintHelper { } } if (isBg) { - // Need to tint the background of a view + // Need to tint the isBackground of a view if (view is FloatingActionButton || view is Button) { setTintSelector(view, color, false, isDark) } else if (view.background != null) {