This reverts commit 1ece88762e
.
# Conflicts:
# app/src/main/java/io/legado/app/utils/UIUtils.kt
# app/src/main/res/drawable/ic_add.xml
# app/src/main/res/drawable/ic_add_online.xml
# app/src/main/res/drawable/ic_arrange.xml
# app/src/main/res/drawable/ic_download_line.xml
# app/src/main/res/drawable/ic_groups.xml
# app/src/main/res/drawable/ic_search.xml
# app/src/main/res/drawable/ic_view_quilt.xml
pull/219/head
parent
97cb025868
commit
e810eb9ab5
@ -1,45 +0,0 @@ |
||||
package io.legado.app.utils |
||||
|
||||
import android.content.Context |
||||
import android.graphics.PorterDuff |
||||
import android.graphics.PorterDuffColorFilter |
||||
import android.os.Build |
||||
import androidx.appcompat.widget.Toolbar |
||||
import androidx.core.content.ContextCompat |
||||
import io.legado.app.R |
||||
import io.legado.app.constant.Theme |
||||
import io.legado.app.lib.theme.primaryTextColor |
||||
|
||||
@Suppress("unused") |
||||
object UIUtils { |
||||
|
||||
/** 设置更多工具条图标和颜色 */ |
||||
fun setToolbarMoreIconCustomColor(toolbar: Toolbar?, color: Int? = null) { |
||||
toolbar ?: return |
||||
val moreIcon = ContextCompat.getDrawable(toolbar.context, R.drawable.ic_more) |
||||
if (moreIcon != null && Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { |
||||
if (color != null) { |
||||
moreIcon.colorFilter = PorterDuffColorFilter(color, PorterDuff.Mode.SRC_ATOP) |
||||
} |
||||
toolbar.overflowIcon = moreIcon |
||||
} |
||||
} |
||||
|
||||
|
||||
fun getMenuColor( |
||||
context: Context, |
||||
theme: Theme = Theme.Auto, |
||||
requiresOverflow: Boolean = false |
||||
): Int { |
||||
val defaultTextColor = context.getCompatColor(R.color.tv_text_default) |
||||
if (requiresOverflow) |
||||
return defaultTextColor |
||||
val primaryTextColor = context.primaryTextColor |
||||
return when (theme) { |
||||
Theme.Dark -> context.getCompatColor(R.color.md_white_1000) |
||||
Theme.Light -> context.getCompatColor(R.color.md_black_1000) |
||||
else -> primaryTextColor |
||||
} |
||||
} |
||||
|
||||
} |
@ -1,15 +0,0 @@ |
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android" |
||||
android:width="24dp" |
||||
android:height="24dp" |
||||
android:viewportWidth="24" |
||||
android:viewportHeight="24"> |
||||
<path |
||||
android:pathData="M12,5.5m-1.5,0a1.5,1.5 0,1 1,3 0a1.5,1.5 0,1 1,-3 0" |
||||
android:fillColor="#202020"/> |
||||
<path |
||||
android:pathData="M12,12m-1.5,0a1.5,1.5 0,1 1,3 0a1.5,1.5 0,1 1,-3 0" |
||||
android:fillColor="#202020"/> |
||||
<path |
||||
android:pathData="M12,18.5m-1.5,0a1.5,1.5 0,1 1,3 0a1.5,1.5 0,1 1,-3 0" |
||||
android:fillColor="#202020"/> |
||||
</vector> |
@ -1,17 +1,12 @@ |
||||
<vector android:autoMirrored="true" |
||||
android:height="24dp" |
||||
android:viewportHeight="48" |
||||
android:viewportWidth="48" |
||||
android:width="24dp" |
||||
xmlns:android="http://schemas.android.com/apk/res/android"> |
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android" |
||||
android:width="16dp" |
||||
android:height="16dp" |
||||
android:viewportWidth="16" |
||||
android:viewportHeight="16"> |
||||
<path |
||||
android:fillColor="#39393A" |
||||
android:pathData="M20,32.7c-6.9,0 -12.6,-5.6 -12.6,-12.6c0,-6.9 5.6,-12.6 12.6,-12.6c6.9,0 12.6,5.6 12.6,12.6C32.6,27 27,32.7 20,32.7M20,9C13.9,9 8.9,14 8.9,20.1c0,6.1 5,11.1 11.1,11.1c6.1,0 11.1,-5 11.1,-11.1C31.1,14 26.2,9 20,9" |
||||
android:strokeColor="#39393A" |
||||
android:strokeWidth="2" /> |
||||
android:fillColor="#FF000000" |
||||
android:pathData="M7,1.49a5.48,5.48 0,1 1,0 11A5.48,5.48 0,0 1,3.1 3.1,5.41 5.41,0 0,1 7,1.49M7,0a7,7 0,1 0,4.94 2A7,7 0,0 0,7 0Z"/> |
||||
<path |
||||
android:fillColor="#39393A" |
||||
android:pathData="M39.8,40.4c-0.2,0 -0.4,-0.1 -0.5,-0.2L28.1,29.1c-0.3,-0.3 -0.3,-0.7 0,-1c0.3,-0.3 0.7,-0.3 1,0l11.1,11.1c0.3,0.3 0.3,0.7 0,1C40.2,40.4 40,40.4 39.8,40.4" |
||||
android:strokeColor="#39393A" |
||||
android:strokeWidth="2" /> |
||||
android:fillColor="#FF000000" |
||||
android:pathData="M13.14,12.39a0.74,0.74 0,0 0,-0.53 0.22,0.75 0.75,0 0,0 0,1.06l2.11,2.11a0.74,0.74 0,0 0,0.53 0.22,0.73 0.73,0 0,0 0.53,-0.22 0.75,0.75 0,0 0,0 -1.06l-2.11,-2.11a0.74,0.74 0,0 0,-0.53 -0.22Z"/> |
||||
</vector> |
||||
|
Loading…
Reference in new issue