feat: 优化代码

pull/134/head^2
kunfei 5 years ago
parent bb7f6e4f0b
commit a4f65c309a
  1. 4
      app/src/main/java/io/legado/app/ui/book/read/config/ReadStyleDialog.kt
  2. 4
      app/src/main/res/layout/dialog_read_book_style.xml

@ -81,7 +81,7 @@ class ReadStyleDialog : DialogFragment(), FontSelectDialog.CallBack {
dsb_text_letter_spacing.valueFormat = {
((it - 50) / 100f).toString()
}
dsb_line_size.valueFormat = { (it / 10f).toString() }
dsb_line_size.valueFormat = { ((it - 10) / 10f).toString() }
dsb_paragraph_spacing.valueFormat = { (it / 10f).toString() }
}
@ -132,7 +132,7 @@ class ReadStyleDialog : DialogFragment(), FontSelectDialog.CallBack {
callBack?.showPaddingConfig()
}
dsb_text_size.onChanged = {
ReadBookConfig.textSize = it + 5
ReadBookConfig.textSize = it + 10
postEvent(EventBus.UP_CONFIG, true)
}
dsb_text_letter_spacing.onChanged = {

@ -123,7 +123,7 @@
android:layout_height="wrap_content"
android:paddingLeft="10dp"
android:paddingRight="10dp"
app:max="50"
app:max="20"
app:title="@string/line_size"
app:layout_constraintTop_toBottomOf="@+id/dsb_text_letter_spacing" />
@ -133,7 +133,7 @@
android:layout_height="wrap_content"
android:paddingLeft="10dp"
android:paddingRight="10dp"
app:max="50"
app:max="20"
app:title="@string/paragraph_size"
app:layout_constraintTop_toBottomOf="@+id/dsb_line_size" />

Loading…
Cancel
Save