mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-18 19:59:19 +01:00
Add an icon for each link in About
This commit is contained in:
parent
0dbb79359b
commit
7272f89db3
@ -17,11 +17,14 @@ import eu.kanade.tachiyomi.ui.setting.SettingsController
|
|||||||
import eu.kanade.tachiyomi.util.CrashLogUtil
|
import eu.kanade.tachiyomi.util.CrashLogUtil
|
||||||
import eu.kanade.tachiyomi.util.lang.launchNow
|
import eu.kanade.tachiyomi.util.lang.launchNow
|
||||||
import eu.kanade.tachiyomi.util.lang.toDateTimestampString
|
import eu.kanade.tachiyomi.util.lang.toDateTimestampString
|
||||||
|
import eu.kanade.tachiyomi.util.preference.iconRes
|
||||||
|
import eu.kanade.tachiyomi.util.preference.iconTint
|
||||||
import eu.kanade.tachiyomi.util.preference.onClick
|
import eu.kanade.tachiyomi.util.preference.onClick
|
||||||
import eu.kanade.tachiyomi.util.preference.preference
|
import eu.kanade.tachiyomi.util.preference.preference
|
||||||
import eu.kanade.tachiyomi.util.preference.preferenceCategory
|
import eu.kanade.tachiyomi.util.preference.preferenceCategory
|
||||||
import eu.kanade.tachiyomi.util.preference.titleRes
|
import eu.kanade.tachiyomi.util.preference.titleRes
|
||||||
import eu.kanade.tachiyomi.util.system.copyToClipboard
|
import eu.kanade.tachiyomi.util.system.copyToClipboard
|
||||||
|
import eu.kanade.tachiyomi.util.system.getResourceColor
|
||||||
import eu.kanade.tachiyomi.util.system.toast
|
import eu.kanade.tachiyomi.util.system.toast
|
||||||
import timber.log.Timber
|
import timber.log.Timber
|
||||||
import java.text.DateFormat
|
import java.text.DateFormat
|
||||||
@ -41,6 +44,8 @@ class AboutController : SettingsController() {
|
|||||||
override fun setupPreferenceScreen(screen: PreferenceScreen) = screen.apply {
|
override fun setupPreferenceScreen(screen: PreferenceScreen) = screen.apply {
|
||||||
titleRes = R.string.pref_category_about
|
titleRes = R.string.pref_category_about
|
||||||
|
|
||||||
|
val tintColor = context.getResourceColor(R.attr.colorAccent)
|
||||||
|
|
||||||
preference {
|
preference {
|
||||||
key = "pref_about_version"
|
key = "pref_about_version"
|
||||||
titleRes = R.string.version
|
titleRes = R.string.version
|
||||||
@ -83,6 +88,8 @@ class AboutController : SettingsController() {
|
|||||||
preference {
|
preference {
|
||||||
key = "pref_about_website"
|
key = "pref_about_website"
|
||||||
titleRes = R.string.website
|
titleRes = R.string.website
|
||||||
|
iconRes = R.drawable.ic_earth_24dp
|
||||||
|
iconTint = tintColor
|
||||||
"https://tachiyomi.org".also {
|
"https://tachiyomi.org".also {
|
||||||
summary = it
|
summary = it
|
||||||
onClick { openInBrowser(it) }
|
onClick { openInBrowser(it) }
|
||||||
@ -91,6 +98,8 @@ class AboutController : SettingsController() {
|
|||||||
preference {
|
preference {
|
||||||
key = "pref_about_facebook"
|
key = "pref_about_facebook"
|
||||||
title = "Facebook"
|
title = "Facebook"
|
||||||
|
iconRes = R.drawable.ic_facebook_24dp
|
||||||
|
iconTint = tintColor
|
||||||
"https://facebook.com/tachiyomiorg".also {
|
"https://facebook.com/tachiyomiorg".also {
|
||||||
summary = it
|
summary = it
|
||||||
onClick { openInBrowser(it) }
|
onClick { openInBrowser(it) }
|
||||||
@ -99,6 +108,8 @@ class AboutController : SettingsController() {
|
|||||||
preference {
|
preference {
|
||||||
key = "pref_about_twitter"
|
key = "pref_about_twitter"
|
||||||
title = "Twitter"
|
title = "Twitter"
|
||||||
|
iconRes = R.drawable.ic_twitter_24dp
|
||||||
|
iconTint = tintColor
|
||||||
"https://twitter.com/tachiyomiorg".also {
|
"https://twitter.com/tachiyomiorg".also {
|
||||||
summary = it
|
summary = it
|
||||||
onClick { openInBrowser(it) }
|
onClick { openInBrowser(it) }
|
||||||
@ -107,6 +118,8 @@ class AboutController : SettingsController() {
|
|||||||
preference {
|
preference {
|
||||||
key = "pref_about_discord"
|
key = "pref_about_discord"
|
||||||
title = "Discord"
|
title = "Discord"
|
||||||
|
iconRes = R.drawable.ic_discord_24dp
|
||||||
|
iconTint = tintColor
|
||||||
"https://discord.gg/tachiyomi".also {
|
"https://discord.gg/tachiyomi".also {
|
||||||
summary = it
|
summary = it
|
||||||
onClick { openInBrowser(it) }
|
onClick { openInBrowser(it) }
|
||||||
@ -115,6 +128,8 @@ class AboutController : SettingsController() {
|
|||||||
preference {
|
preference {
|
||||||
key = "pref_about_github"
|
key = "pref_about_github"
|
||||||
title = "GitHub"
|
title = "GitHub"
|
||||||
|
iconRes = R.drawable.ic_github_24dp
|
||||||
|
iconTint = tintColor
|
||||||
"https://github.com/tachiyomiorg".also {
|
"https://github.com/tachiyomiorg".also {
|
||||||
summary = it
|
summary = it
|
||||||
onClick { openInBrowser(it) }
|
onClick { openInBrowser(it) }
|
||||||
|
12
app/src/main/res/drawable/ic_discord_24dp.xml
Normal file
12
app/src/main/res/drawable/ic_discord_24dp.xml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="18.591549dp"
|
||||||
|
android:viewportWidth="71"
|
||||||
|
android:viewportHeight="55">
|
||||||
|
<group>
|
||||||
|
<clip-path android:pathData="M0,0h71v55h-71z" />
|
||||||
|
<path
|
||||||
|
android:fillColor="@android:color/black"
|
||||||
|
android:pathData="M60.1045,4.8978C55.5792,2.8214 50.7265,1.2916 45.6527,0.4154C45.5603,0.3985 45.468,0.4408 45.4204,0.5253C44.7963,1.6353 44.105,3.0834 43.6209,4.2216C38.1637,3.4046 32.7345,3.4046 27.3892,4.2216C26.905,3.0581 26.1886,1.6353 25.5617,0.5253C25.5141,0.4436 25.4218,0.4013 25.3294,0.4154C20.2584,1.2888 15.4057,2.8186 10.8776,4.8978C10.8384,4.9147 10.8048,4.9429 10.7825,4.9795C1.578,18.7309 -0.9436,32.1443 0.2934,45.3914C0.299,45.4562 0.3354,45.5182 0.3858,45.5576C6.4587,50.0174 12.3413,52.7249 18.1147,54.5195C18.2071,54.5477 18.305,54.5139 18.3638,54.4378C19.7295,52.5728 20.9469,50.6063 21.9907,48.5383C22.0523,48.4172 21.9935,48.2735 21.8676,48.2256C19.9366,47.4931 18.0979,46.6 16.3292,45.5858C16.1893,45.5041 16.1781,45.304 16.3068,45.2082C16.679,44.9293 17.0513,44.6391 17.4067,44.3461C17.471,44.2926 17.5606,44.2813 17.6362,44.3151C29.2558,49.6202 41.8354,49.6202 53.3179,44.3151C53.3935,44.2785 53.4831,44.2898 53.5502,44.3433C53.9057,44.6363 54.2779,44.9293 54.6529,45.2082C54.7816,45.304 54.7732,45.5041 54.6333,45.5858C52.8646,46.6197 51.0259,47.4931 49.0921,48.2228C48.9662,48.2707 48.9102,48.4172 48.9718,48.5383C50.038,50.6034 51.2554,52.5699 52.5959,54.435C52.6519,54.5139 52.7526,54.5477 52.845,54.5195C58.6464,52.7249 64.529,50.0174 70.6019,45.5576C70.6551,45.5182 70.6887,45.459 70.6943,45.3942C72.1747,30.0791 68.2147,16.7757 60.1968,4.9823C60.1772,4.9429 60.1437,4.9147 60.1045,4.8978ZM23.7259,37.3253C20.2276,37.3253 17.3451,34.1136 17.3451,30.1693C17.3451,26.225 20.1717,23.0133 23.7259,23.0133C27.308,23.0133 30.1626,26.2532 30.1066,30.1693C30.1066,34.1136 27.28,37.3253 23.7259,37.3253ZM47.3178,37.3253C43.8196,37.3253 40.9371,34.1136 40.9371,30.1693C40.9371,26.225 43.7636,23.0133 47.3178,23.0133C50.9,23.0133 53.7545,26.2532 53.6986,30.1693C53.6986,34.1136 50.9,37.3253 47.3178,37.3253Z" />
|
||||||
|
</group>
|
||||||
|
</vector>
|
9
app/src/main/res/drawable/ic_earth_24dp.xml
Normal file
9
app/src/main/res/drawable/ic_earth_24dp.xml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:fillColor="@android:color/black"
|
||||||
|
android:pathData="M17.9,17.39C17.64,16.59 16.89,16 16,16H15V13A1,1 0 0,0 14,12H8V10H10A1,1 0 0,0 11,9V7H13A2,2 0 0,0 15,5V4.59C17.93,5.77 20,8.64 20,12C20,14.08 19.2,15.97 17.9,17.39M11,19.93C7.05,19.44 4,16.08 4,12C4,11.38 4.08,10.78 4.21,10.21L9,15V16A2,2 0 0,0 11,18M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z" />
|
||||||
|
</vector>
|
9
app/src/main/res/drawable/ic_facebook_24dp.xml
Normal file
9
app/src/main/res/drawable/ic_facebook_24dp.xml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:fillColor="@android:color/black"
|
||||||
|
android:pathData="M12 2.04C6.5 2.04 2 6.53 2 12.06C2 17.06 5.66 21.21 10.44 21.96V14.96H7.9V12.06H10.44V9.85C10.44 7.34 11.93 5.96 14.22 5.96C15.31 5.96 16.45 6.15 16.45 6.15V8.62H15.19C13.95 8.62 13.56 9.39 13.56 10.18V12.06H16.34L15.89 14.96H13.56V21.96A10 10 0 0 0 22 12.06C22 6.53 17.5 2.04 12 2.04Z" />
|
||||||
|
</vector>
|
9
app/src/main/res/drawable/ic_github_24dp.xml
Normal file
9
app/src/main/res/drawable/ic_github_24dp.xml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:fillColor="@android:color/black"
|
||||||
|
android:pathData="M12,2A10,10 0 0,0 2,12C2,16.42 4.87,20.17 8.84,21.5C9.34,21.58 9.5,21.27 9.5,21C9.5,20.77 9.5,20.14 9.5,19.31C6.73,19.91 6.14,17.97 6.14,17.97C5.68,16.81 5.03,16.5 5.03,16.5C4.12,15.88 5.1,15.9 5.1,15.9C6.1,15.97 6.63,16.93 6.63,16.93C7.5,18.45 8.97,18 9.54,17.76C9.63,17.11 9.89,16.67 10.17,16.42C7.95,16.17 5.62,15.31 5.62,11.5C5.62,10.39 6,9.5 6.65,8.79C6.55,8.54 6.2,7.5 6.75,6.15C6.75,6.15 7.59,5.88 9.5,7.17C10.29,6.95 11.15,6.84 12,6.84C12.85,6.84 13.71,6.95 14.5,7.17C16.41,5.88 17.25,6.15 17.25,6.15C17.8,7.5 17.45,8.54 17.35,8.79C18,9.5 18.38,10.39 18.38,11.5C18.38,15.32 16.04,16.16 13.81,16.41C14.17,16.72 14.5,17.33 14.5,18.26C14.5,19.6 14.5,20.68 14.5,21C14.5,21.27 14.66,21.59 15.17,21.5C19.14,20.16 22,16.42 22,12A10,10 0 0,0 12,2Z" />
|
||||||
|
</vector>
|
9
app/src/main/res/drawable/ic_twitter_24dp.xml
Normal file
9
app/src/main/res/drawable/ic_twitter_24dp.xml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:fillColor="@android:color/black"
|
||||||
|
android:pathData="M22.46,6C21.69,6.35 20.86,6.58 20,6.69C20.88,6.16 21.56,5.32 21.88,4.31C21.05,4.81 20.13,5.16 19.16,5.36C18.37,4.5 17.26,4 16,4C13.65,4 11.73,5.92 11.73,8.29C11.73,8.63 11.77,8.96 11.84,9.27C8.28,9.09 5.11,7.38 3,4.79C2.63,5.42 2.42,6.16 2.42,6.94C2.42,8.43 3.17,9.75 4.33,10.5C3.62,10.5 2.96,10.3 2.38,10C2.38,10 2.38,10 2.38,10.03C2.38,12.11 3.86,13.85 5.82,14.24C5.46,14.34 5.08,14.39 4.69,14.39C4.42,14.39 4.15,14.36 3.89,14.31C4.43,16 6,17.26 7.89,17.29C6.43,18.45 4.58,19.13 2.56,19.13C2.22,19.13 1.88,19.11 1.54,19.07C3.44,20.29 5.7,21 8.12,21C16,21 20.33,14.46 20.33,8.79C20.33,8.6 20.33,8.42 20.32,8.23C21.16,7.63 21.88,6.87 22.46,6Z" />
|
||||||
|
</vector>
|
Loading…
Reference in New Issue
Block a user