diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/PageIndicatorTextView.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/PageIndicatorTextView.kt
index c467ce0db0..a6201364ef 100644
--- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/PageIndicatorTextView.kt
+++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/PageIndicatorTextView.kt
@@ -2,15 +2,14 @@ package eu.kanade.tachiyomi.ui.reader
import android.annotation.SuppressLint
import android.content.Context
-import android.graphics.Canvas
import android.graphics.Color
-import android.graphics.Paint
-import androidx.appcompat.widget.AppCompatTextView
import android.text.Spannable
import android.text.SpannableString
import android.text.style.ScaleXSpan
import android.util.AttributeSet
import android.widget.TextView
+import androidx.appcompat.widget.AppCompatTextView
+import eu.kanade.tachiyomi.widget.OutlineSpan
/**
* Page indicator found at the bottom of the reader
@@ -42,10 +41,13 @@ class PageIndicatorTextView(
val currText = " $text "
// Also add a bit of spacing between each character, as the stroke overlaps them
- val finalText = SpannableString(currText.asIterable().joinToString("\u00A0"))
+ val finalText = SpannableString(currText.asIterable().joinToString("\u00A0")).apply {
+ // Apply text outline
+ setSpan(spanOutline, 1, length-1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE)
- for (i in 1..finalText.lastIndex step 2) {
- finalText.setSpan(ScaleXSpan(0.1f), i, i + 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE)
+ for (i in 1..lastIndex step 2) {
+ setSpan(ScaleXSpan(0.2f), i, i + 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE)
+ }
}
super.setText(finalText, TextView.BufferType.SPANNABLE)
diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsGeneralController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsGeneralController.kt
index 7395f259a8..c54ba5d0ee 100644
--- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsGeneralController.kt
+++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsGeneralController.kt
@@ -69,7 +69,6 @@ class SettingsGeneralController : SettingsController() {
true
}
}
-
intListPreference {
key = Keys.startScreen
titleRes = R.string.pref_start_screen
diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsMainController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsMainController.kt
index 1445d57490..6bf8824b5d 100644
--- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsMainController.kt
+++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsMainController.kt
@@ -20,7 +20,7 @@ class SettingsMainController : SettingsController() {
onClick { navigateTo(SettingsGeneralController()) }
}
preference {
- iconRes = R.drawable.ic_in_library_24dp
+ iconRes = R.drawable.ic_book_black_24dp
iconTint = tintColor
titleRes = R.string.pref_category_library
onClick { navigateTo(SettingsLibraryController()) }
diff --git a/app/src/main/java/eu/kanade/tachiyomi/widget/OutlineSpan.kt b/app/src/main/java/eu/kanade/tachiyomi/widget/OutlineSpan.kt
new file mode 100644
index 0000000000..79b2057778
--- /dev/null
+++ b/app/src/main/java/eu/kanade/tachiyomi/widget/OutlineSpan.kt
@@ -0,0 +1,57 @@
+package eu.kanade.tachiyomi.widget
+
+import android.graphics.Canvas
+import android.graphics.Paint
+import android.text.style.ReplacementSpan
+import androidx.annotation.ColorInt
+import androidx.annotation.Dimension
+
+/**
+ * Source: https://github.com/santaevpavel
+ *
+ * A class that draws the outlines of a text when given a stroke color and stroke width.
+ */
+class OutlineSpan(
+ @ColorInt private val strokeColor: Int,
+ @Dimension private val strokeWidth: Float
+) : ReplacementSpan() {
+
+ override fun getSize(
+ paint: Paint,
+ text: CharSequence,
+ start: Int,
+ end: Int,
+ fm: Paint.FontMetricsInt?
+ ): Int {
+ return paint.measureText(text.toString().substring(start until end)).toInt()
+ }
+
+ override fun draw(
+ canvas: Canvas,
+ text: CharSequence,
+ start: Int,
+ end: Int,
+ x: Float,
+ top: Int,
+ y: Int,
+ bottom: Int,
+ paint: Paint
+ ) {
+ val originTextColor = paint.color
+
+ paint.apply {
+ color = strokeColor
+ style = Paint.Style.STROKE
+ this.strokeWidth = this@OutlineSpan.strokeWidth
+ }
+ canvas.drawText(text, start, end, x, y.toFloat(), paint)
+
+ paint.apply {
+ color = originTextColor
+ style = Paint.Style.FILL
+ }
+
+ canvas.drawText(text, start, end, x, y.toFloat(), paint)
+ }
+
+}
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index cf9525de5c..a9fa247eed 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -137,6 +137,19 @@
About
+ App theme
+ Light
+ Dark
+ AMOLED dark
+ Dark blue
+ System default
+ System default (AMOLED dark)
+ System default (Dark blue)
+ Start screen
+ Language
+ System default
+
+
Library manga per row
Portrait
Landscape
@@ -169,17 +182,6 @@
Use last saved pre-migration preferences
and sources to mass migrate
Confirm before updating
- App theme
- Light
- Dark
- AMOLED dark
- Dark blue
- System default
- System default (AMOLED dark)
- System default (Dark blue)
- Start screen
- Language
- System default
Default category
Always ask
Lock with biometrics