diff --git a/app/src/main/java/io/legado/app/lib/theme/view/ATERadioNoButton.kt b/app/src/main/java/io/legado/app/lib/theme/view/ATERadioNoButton.kt index 138f05992..2e7763741 100644 --- a/app/src/main/java/io/legado/app/lib/theme/view/ATERadioNoButton.kt +++ b/app/src/main/java/io/legado/app/lib/theme/view/ATERadioNoButton.kt @@ -1,12 +1,13 @@ package io.legado.app.lib.theme.view import android.content.Context -import android.graphics.Color import android.util.AttributeSet import androidx.appcompat.widget.AppCompatRadioButton +import io.legado.app.R import io.legado.app.lib.theme.Selector import io.legado.app.lib.theme.ThemeStore import io.legado.app.utils.dp +import io.legado.app.utils.getCompatColor /** * @author Aidan Follestad (afollestad) @@ -27,11 +28,11 @@ class ATERadioNoButton : AppCompatRadioButton { private fun init(context: Context, attrs: AttributeSet?) { background = Selector.shapeBuild() - .setCornerRadius(3.dp) - .setStrokeWidth(3.dp) + .setCornerRadius(2.dp) + .setStrokeWidth(2.dp) .setCheckedBgColor(ThemeStore.accentColor(context)) .setCheckedStrokeColor(ThemeStore.accentColor(context)) - .setDefaultStrokeColor(Color.WHITE) + .setDefaultStrokeColor(context.getCompatColor(R.color.tv_text_default)) .create() } } diff --git a/app/src/main/java/io/legado/app/ui/readbook/config/ReadStyleDialog.kt b/app/src/main/java/io/legado/app/ui/readbook/config/ReadStyleDialog.kt index 1ac15d2cb..e5900e141 100644 --- a/app/src/main/java/io/legado/app/ui/readbook/config/ReadStyleDialog.kt +++ b/app/src/main/java/io/legado/app/ui/readbook/config/ReadStyleDialog.kt @@ -125,6 +125,24 @@ class ReadStyleDialog : DialogFragment() { seek_text_letter_spacing.progress = (letterSpacing * 10).toInt() + 5 postEvent(Bus.UP_CONFIG, true) } + seek_line_size.setOnSeekBarChangeListener(object : + SeekBar.OnSeekBarChangeListener { + override fun onProgressChanged(seekBar: SeekBar?, progress: Int, fromUser: Boolean) { + lineSpacingExtra = progress.toFloat() + postEvent(Bus.UP_CONFIG, true) + } + + override fun onStartTrackingTouch(seekBar: SeekBar?) {} + override fun onStopTrackingTouch(seekBar: SeekBar?) {} + }) + iv_line_size_add.onClick { + lineSpacingExtra++ + postEvent(Bus.UP_CONFIG, true) + } + iv_line_size_remove.onClick { + lineSpacingExtra-- + postEvent(Bus.UP_CONFIG, true) + } rg_page_anim.onCheckedChange { _, checkedId -> for (i in 0 until rg_page_anim.childCount) { if (checkedId == rg_page_anim[i].id) { diff --git a/app/src/main/res/layout/dialog_read_book_style.xml b/app/src/main/res/layout/dialog_read_book_style.xml index 0bb212cf4..362a1f6ae 100644 --- a/app/src/main/res/layout/dialog_read_book_style.xml +++ b/app/src/main/res/layout/dialog_read_book_style.xml @@ -182,7 +182,7 @@ android:max="50" />