More themes cleanup (#5410)
* More themes cleanup * Tweak some things * Fix 'Clear History' icon * Split out ripple colored to its own drawable * Tidy up things * Unify background dim amount * Use primaryColor for Account login button * More colored ripples * use colorOnPrimary for selected comfortable library item title Co-authored-by: Soitora <simon.mattila@protonmail.com>
This commit is contained in:
@@ -2,22 +2,18 @@ package eu.kanade.tachiyomi.widget
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
||||
import com.mikepenz.aboutlibraries.util.getThemeColor
|
||||
import eu.kanade.tachiyomi.R
|
||||
|
||||
class ThemedSwipeRefreshLayout @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null) :
|
||||
SwipeRefreshLayout(context, attrs) {
|
||||
|
||||
class ThemedSwipeRefreshLayout @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null
|
||||
) : SwipeRefreshLayout(context, attrs) {
|
||||
init {
|
||||
setColors()
|
||||
}
|
||||
|
||||
private fun setColors() {
|
||||
// Background is controlled with "swipeRefreshLayoutProgressSpinnerBackgroundColor" in XML
|
||||
|
||||
// Background
|
||||
setProgressBackgroundColorSchemeColor(context.getThemeColor(R.attr.colorPrimary))
|
||||
// This updates the progress arrow color
|
||||
val white = ContextCompat.getColor(context, R.color.md_white_1000)
|
||||
setColorSchemeColors(white, white, white)
|
||||
setColorSchemeColors(context.getThemeColor(R.attr.colorOnPrimary))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user