diff --git a/app/src/main/kotlin/org/koitharu/kotatsu/core/ui/widgets/ProgressButton.kt b/app/src/main/kotlin/org/koitharu/kotatsu/core/ui/widgets/ProgressButton.kt
index 0bd4ce8cc..16ff3449d 100644
--- a/app/src/main/kotlin/org/koitharu/kotatsu/core/ui/widgets/ProgressButton.kt
+++ b/app/src/main/kotlin/org/koitharu/kotatsu/core/ui/widgets/ProgressButton.kt
@@ -35,8 +35,9 @@ class ProgressButton @JvmOverloads constructor(
private val paint = Paint(Paint.ANTI_ALIAS_FLAG)
private var progress = 0f
- private var colorBase = context.getThemeColor(materialR.attr.colorSecondaryContainer)
+ private var colorBase = context.getThemeColor(materialR.attr.colorPrimaryContainer)
private var colorProgress = context.getThemeColor(materialR.attr.colorPrimary)
+ private var colorText = context.getThemeColor(materialR.attr.colorOnPrimaryContainer)
private var progressAnimator: ValueAnimator? = null
var title: CharSequence?
@@ -70,6 +71,9 @@ class ProgressButton @JvmOverloads constructor(
textViewSubtitle.text = getText(R.styleable.ProgressButton_subtitle)
colorBase = getColor(R.styleable.ProgressButton_baseColor, colorBase)
colorProgress = getColor(R.styleable.ProgressButton_progressColor, colorProgress)
+ colorText = getColor(R.styleable.ProgressButton_textColor, colorText)
+ textViewTitle.setTextColor(colorText)
+ textViewSubtitle.setTextColor(colorText)
progress = getInt(R.styleable.ProgressButton_android_progress, 0).toFloat() /
getInt(R.styleable.ProgressButton_android_max, 100).toFloat()
}
@@ -84,6 +88,7 @@ class ProgressButton @JvmOverloads constructor(
paint.style = Paint.Style.FILL
paint.color = colorProgress
+ paint.alpha = 84 // 255 * 0.33F
applyGravity()
setWillNotDraw(false)
}
diff --git a/app/src/main/res/layout/activity_details_new.xml b/app/src/main/res/layout/activity_details_new.xml
index c15de2be4..830a59794 100644
--- a/app/src/main/res/layout/activity_details_new.xml
+++ b/app/src/main/res/layout/activity_details_new.xml
@@ -183,8 +183,9 @@
app:layout_constraintEnd_toStartOf="@id/button_chapters"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/info_layout"
- app:progressColor="?colorSecondaryFixedDim"
+ app:progressColor="?colorPrimary"
app:subtitleTextAppearance="?textAppearanceBodySmall"
+ app:textColor="?colorOnPrimaryContainer"
app:titleTextAppearance="?textAppearanceButton"
tools:max="100"
tools:progress="40"
diff --git a/app/src/main/res/values/attrs.xml b/app/src/main/res/values/attrs.xml
index 26977cbac..66d8d775d 100644
--- a/app/src/main/res/values/attrs.xml
+++ b/app/src/main/res/values/attrs.xml
@@ -153,6 +153,7 @@
+