diff --git a/app/src/main/java/io/legado/app/base/AppContextWrapper.kt b/app/src/main/java/io/legado/app/base/AppContextWrapper.kt index 74a7fa253..7ef7026d3 100644 --- a/app/src/main/java/io/legado/app/base/AppContextWrapper.kt +++ b/app/src/main/java/io/legado/app/base/AppContextWrapper.kt @@ -15,7 +15,7 @@ object AppContextWrapper { fun wrap(context: Context): Context { var fontScale = context.getPrefInt(PreferKey.fontScale) / 10f - if (fontScale !in 1f..2f) { + if (fontScale !in 0.8f..1.6f) { fontScale = Configuration().fontScale } return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { diff --git a/app/src/main/java/io/legado/app/ui/config/ThemeConfigFragment.kt b/app/src/main/java/io/legado/app/ui/config/ThemeConfigFragment.kt index 79d3147bc..32940bd94 100644 --- a/app/src/main/java/io/legado/app/ui/config/ThemeConfigFragment.kt +++ b/app/src/main/java/io/legado/app/ui/config/ThemeConfigFragment.kt @@ -155,8 +155,8 @@ class ThemeConfigFragment : BasePreferenceFragment(), } PreferKey.fontScale -> NumberPickerDialog(requireContext()) .setTitle(getString(R.string.font_scale)) - .setMaxValue(20) - .setMinValue(10) + .setMaxValue(16) + .setMinValue(8) .setCustomButton((R.string.btn_default_s)) { putPrefInt(PreferKey.fontScale, 0) recreateActivities() @@ -277,7 +277,7 @@ class ThemeConfigFragment : BasePreferenceFragment(), getString(R.string.bar_elevation_s, value) PreferKey.fontScale -> { var fontScale = getPrefInt(PreferKey.fontScale) / 10f - if (fontScale !in 1f..2f) { + if (fontScale !in 0.8f..1.6f) { fontScale = resources.configuration.fontScale } preference.summary = getString(R.string.font_scale_summary, fontScale)