feat(YouTube): separate the Shorts outline button
patch from Overlay buttons
patch
@ -124,40 +124,10 @@ object OverlayButtonsPatch : ResourcePatch() {
|
||||
"yt_outline_arrow_shuffle_1_white_24.png",
|
||||
"yt_outline_screen_full_exit_white_24.png",
|
||||
"yt_outline_screen_full_white_24.png"
|
||||
),
|
||||
// Shorts outline icons for older versions of YouTube
|
||||
ResourceUtils.ResourceGroup(
|
||||
"drawable",
|
||||
"ic_right_comment_32c.xml",
|
||||
"ic_right_dislike_off_32c.xml",
|
||||
"ic_right_like_off_32c.xml",
|
||||
"ic_right_share_32c.xml"
|
||||
)
|
||||
).forEach { resourceGroup ->
|
||||
context.copyResources("youtube/overlaybuttons/outline", resourceGroup)
|
||||
}
|
||||
|
||||
// Shorts outline icons
|
||||
arrayOf(
|
||||
"xxxhdpi",
|
||||
"xxhdpi",
|
||||
"xhdpi",
|
||||
"hdpi",
|
||||
"mdpi"
|
||||
).forEach { dpi ->
|
||||
context.copyResources(
|
||||
"youtube/overlaybuttons/outline",
|
||||
ResourceUtils.ResourceGroup(
|
||||
"drawable-$dpi",
|
||||
"ic_remix_filled_white_24.webp",
|
||||
"ic_remix_filled_white_shadowed.webp",
|
||||
"ic_right_comment_shadowed.webp",
|
||||
"ic_right_dislike_off_shadowed.webp",
|
||||
"ic_right_like_off_shadowed.webp",
|
||||
"ic_right_share_shadowed.webp"
|
||||
)
|
||||
)
|
||||
}
|
||||
} else {
|
||||
arrayOf(
|
||||
ResourceUtils.ResourceGroup(
|
||||
|
@ -0,0 +1,83 @@
|
||||
package app.revanced.patches.youtube.shorts.outlinebutton
|
||||
|
||||
import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patches.youtube.utils.settings.SettingsPatch
|
||||
import app.revanced.util.resources.ResourceUtils
|
||||
import app.revanced.util.resources.ResourceUtils.copyResources
|
||||
|
||||
@Patch(
|
||||
name = "Shorts outline button",
|
||||
description = "Apply the outline icon to the action button of the Shorts player.",
|
||||
dependencies = [SettingsPatch::class],
|
||||
compatiblePackages = [
|
||||
CompatiblePackage(
|
||||
"com.google.android.youtube",
|
||||
[
|
||||
"18.25.40",
|
||||
"18.27.36",
|
||||
"18.29.38",
|
||||
"18.30.37",
|
||||
"18.31.40",
|
||||
"18.32.39",
|
||||
"18.33.40",
|
||||
"18.34.38",
|
||||
"18.35.36",
|
||||
"18.36.39",
|
||||
"18.37.36",
|
||||
"18.38.44",
|
||||
"18.39.41",
|
||||
"18.40.34",
|
||||
"18.41.39",
|
||||
"18.42.41",
|
||||
"18.43.45",
|
||||
"18.44.41"
|
||||
]
|
||||
)
|
||||
],
|
||||
use = false
|
||||
)
|
||||
@Suppress("unused")
|
||||
object ShortsOutlineButton : ResourcePatch() {
|
||||
override fun execute(context: ResourceContext) {
|
||||
|
||||
arrayOf(
|
||||
"xxxhdpi",
|
||||
"xxhdpi",
|
||||
"xhdpi",
|
||||
"hdpi",
|
||||
"mdpi"
|
||||
).forEach { dpi ->
|
||||
context.copyResources(
|
||||
"youtube/shorts/outline",
|
||||
ResourceUtils.ResourceGroup(
|
||||
"drawable-$dpi",
|
||||
"ic_remix_filled_white_24.webp",
|
||||
"ic_remix_filled_white_shadowed.webp",
|
||||
"ic_right_comment_shadowed.webp",
|
||||
"ic_right_dislike_off_shadowed.webp",
|
||||
"ic_right_like_off_shadowed.webp",
|
||||
"ic_right_share_shadowed.webp"
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
arrayOf(
|
||||
// Shorts outline icons for older versions of YouTube
|
||||
ResourceUtils.ResourceGroup(
|
||||
"drawable",
|
||||
"ic_right_comment_32c.xml",
|
||||
"ic_right_dislike_off_32c.xml",
|
||||
"ic_right_like_off_32c.xml",
|
||||
"ic_right_share_32c.xml"
|
||||
)
|
||||
).forEach { resourceGroup ->
|
||||
context.copyResources("youtube/shorts/outline", resourceGroup)
|
||||
}
|
||||
|
||||
SettingsPatch.updatePatchStatus("Shorts outline button")
|
||||
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 784 B After Width: | Height: | Size: 784 B |
Before Width: | Height: | Size: 928 B After Width: | Height: | Size: 928 B |
Before Width: | Height: | Size: 924 B After Width: | Height: | Size: 924 B |
Before Width: | Height: | Size: 870 B After Width: | Height: | Size: 870 B |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 6.2 KiB |
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 6.2 KiB |
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.3 KiB |
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 5.9 KiB |
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.8 KiB |
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 5.6 KiB |
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 5.6 KiB |
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 5.6 KiB |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB |
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB |
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |