From 70c8dac18d534296e9a4202eb3eb3723885b0fc4 Mon Sep 17 00:00:00 2001 From: gedoor Date: Fri, 7 Aug 2020 15:34:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=BB=E9=A2=98=E8=89=B2=E9=80=82=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/io/legado/app/lib/dialogs/AndroidSelectors.kt | 3 ++- .../io/legado/app/ui/book/read/config/ChineseConverter.kt | 3 ++- .../java/io/legado/app/ui/book/read/config/ReadStyleDialog.kt | 2 +- .../legado/app/ui/book/read/config/TextFontWeightConverter.kt | 4 ++-- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/io/legado/app/lib/dialogs/AndroidSelectors.kt b/app/src/main/java/io/legado/app/lib/dialogs/AndroidSelectors.kt index 17ed0dea8..1eb5dbff9 100644 --- a/app/src/main/java/io/legado/app/lib/dialogs/AndroidSelectors.kt +++ b/app/src/main/java/io/legado/app/lib/dialogs/AndroidSelectors.kt @@ -21,6 +21,7 @@ package io.legado.app.lib.dialogs import android.content.Context import android.content.DialogInterface import androidx.fragment.app.Fragment +import io.legado.app.utils.applyTint inline fun Fragment.selector( title: CharSequence? = null, @@ -38,6 +39,6 @@ fun Context.selector( this.title = title } items(items, onClick) - show() + show().applyTint() } } diff --git a/app/src/main/java/io/legado/app/ui/book/read/config/ChineseConverter.kt b/app/src/main/java/io/legado/app/ui/book/read/config/ChineseConverter.kt index dc8f36d67..af8408284 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/config/ChineseConverter.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/config/ChineseConverter.kt @@ -10,6 +10,7 @@ import io.legado.app.help.AppConfig import io.legado.app.lib.dialogs.alert import io.legado.app.lib.theme.accentColor import io.legado.app.ui.widget.text.StrokeTextView +import io.legado.app.utils.applyTint import org.jetbrains.anko.sdk27.listeners.onClick class ChineseConverter(context: Context, attrs: AttributeSet?) : StrokeTextView(context, attrs) { @@ -44,7 +45,7 @@ class ChineseConverter(context: Context, attrs: AttributeSet?) : StrokeTextView( upUi(i) onChanged?.invoke() } - }.show() + }.show().applyTint() } fun onChanged(unit: () -> Unit) { diff --git a/app/src/main/java/io/legado/app/ui/book/read/config/ReadStyleDialog.kt b/app/src/main/java/io/legado/app/ui/book/read/config/ReadStyleDialog.kt index 88f8fe6fa..50b045c1c 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/config/ReadStyleDialog.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/config/ReadStyleDialog.kt @@ -192,7 +192,7 @@ class ReadStyleDialog : DialogFragment(), FontSelectDialog.CallBack { } } customView = rootView - }.show() + }.show().applyTint() } private fun changeBg(index: Int) { diff --git a/app/src/main/java/io/legado/app/ui/book/read/config/TextFontWeightConverter.kt b/app/src/main/java/io/legado/app/ui/book/read/config/TextFontWeightConverter.kt index 12f5243fa..fbff59f3e 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/config/TextFontWeightConverter.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/config/TextFontWeightConverter.kt @@ -6,11 +6,11 @@ import android.text.SpannableString import android.text.style.ForegroundColorSpan import android.util.AttributeSet import io.legado.app.R -import io.legado.app.help.AppConfig import io.legado.app.help.ReadBookConfig import io.legado.app.lib.dialogs.alert import io.legado.app.lib.theme.accentColor import io.legado.app.ui.widget.text.StrokeTextView +import io.legado.app.utils.applyTint import org.jetbrains.anko.sdk27.listeners.onClick class TextFontWeightConverter(context: Context, attrs: AttributeSet?) : StrokeTextView(context, attrs) { @@ -46,7 +46,7 @@ class TextFontWeightConverter(context: Context, attrs: AttributeSet?) : StrokeTe upUi(i) onChanged?.invoke() } - }.show() + }.show().applyTint() } fun onChanged(unit: () -> Unit) {