diff --git a/src/main/kotlin/app/revanced/patches/microg/layout/branding/icon/patch/CustomBrandingIconMMTPatch.kt b/src/main/kotlin/app/revanced/patches/microg/layout/branding/icon/patch/CustomBrandingIconMMTPatch.kt new file mode 100644 index 000000000..2f50750e6 --- /dev/null +++ b/src/main/kotlin/app/revanced/patches/microg/layout/branding/icon/patch/CustomBrandingIconMMTPatch.kt @@ -0,0 +1,25 @@ +package app.revanced.patches.microg.layout.branding.icon.patch + +import app.revanced.patcher.annotation.Description +import app.revanced.patcher.annotation.Name +import app.revanced.patcher.annotation.Version +import app.revanced.patcher.data.ResourceContext +import app.revanced.patcher.patch.* +import app.revanced.patcher.patch.annotations.Patch +import app.revanced.patches.microg.utils.annotations.MicroGCompatibility +import app.revanced.util.resources.MicroGResourceUtils.copyFiles + +@Patch +@Name("custom-branding-microg-mmt") +@Description("Changes the MicroG launcher icon to MMT.") +@MicroGCompatibility +@Version("0.0.1") +class CustomBrandingIconMMTPatch : ResourcePatch { + override fun execute(context: ResourceContext): PatchResult { + + context.copyFiles("microg/branding/mmt") + + return PatchResultSuccess() + } + +} diff --git a/src/main/kotlin/app/revanced/patches/microg/layout/materialyou/MicrogMaterialYouPatch.kt b/src/main/kotlin/app/revanced/patches/microg/layout/materialyou/MicrogMaterialYouPatch.kt new file mode 100644 index 000000000..429703b9d --- /dev/null +++ b/src/main/kotlin/app/revanced/patches/microg/layout/materialyou/MicrogMaterialYouPatch.kt @@ -0,0 +1,36 @@ +package app.revanced.patches.microg.layout.branding.icon.patch + +import app.revanced.patcher.annotation.Description +import app.revanced.patcher.annotation.Name +import app.revanced.patcher.annotation.Version +import app.revanced.patcher.data.ResourceContext +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess +import app.revanced.patcher.patch.ResourcePatch +import app.revanced.patcher.patch.annotations.Patch +import app.revanced.patches.microg.utils.annotations.MicroGCompatibility + +import app.revanced.util.resources.ResourceUtils +import app.revanced.util.resources.ResourceUtils.copyResources + +@Patch(false) +@Name("microg-materialyou") +@Description("Enables MaterialYou theme for microG for Android 12+") +@MicroGCompatibility +@Version("0.0.1") +class MicrogMaterialYouPatch : ResourcePatch { + override fun execute(context: ResourceContext): PatchResult { + + arrayOf( + ResourceUtils.ResourceGroup( + "values-v31", + "styles.xml" + ), + ).forEach { + context["res/${it.resourceDirectoryName}"].mkdirs() + context.copyResources("microg/materialyou", it) + } + + return PatchResultSuccess() + } +} \ No newline at end of file diff --git a/src/main/resources/microg/branding/mmt/drawable/ic_app_icons_themed_microg.xml b/src/main/resources/microg/branding/mmt/drawable/ic_app_icons_themed_microg.xml new file mode 100644 index 000000000..eafb1b570 --- /dev/null +++ b/src/main/resources/microg/branding/mmt/drawable/ic_app_icons_themed_microg.xml @@ -0,0 +1,18 @@ + + + +/> + \ No newline at end of file diff --git a/src/main/resources/microg/branding/mmt/drawable/ic_microg_launcher_foreground.xml b/src/main/resources/microg/branding/mmt/drawable/ic_microg_launcher_foreground.xml new file mode 100644 index 000000000..13eb6b2cc --- /dev/null +++ b/src/main/resources/microg/branding/mmt/drawable/ic_microg_launcher_foreground.xml @@ -0,0 +1,18 @@ + + + + + + \ No newline at end of file diff --git a/src/main/resources/microg/branding/mmt/mipmap-hdpi/ic_microg_launcher.png b/src/main/resources/microg/branding/mmt/mipmap-hdpi/ic_microg_launcher.png new file mode 100644 index 000000000..3bf926466 Binary files /dev/null and b/src/main/resources/microg/branding/mmt/mipmap-hdpi/ic_microg_launcher.png differ diff --git a/src/main/resources/microg/branding/mmt/mipmap-mdpi/ic_microg_launcher.png b/src/main/resources/microg/branding/mmt/mipmap-mdpi/ic_microg_launcher.png new file mode 100644 index 000000000..3dc3ee791 Binary files /dev/null and b/src/main/resources/microg/branding/mmt/mipmap-mdpi/ic_microg_launcher.png differ diff --git a/src/main/resources/microg/branding/mmt/mipmap-xhdpi/ic_microg_launcher.png b/src/main/resources/microg/branding/mmt/mipmap-xhdpi/ic_microg_launcher.png new file mode 100644 index 000000000..b567bc4a0 Binary files /dev/null and b/src/main/resources/microg/branding/mmt/mipmap-xhdpi/ic_microg_launcher.png differ diff --git a/src/main/resources/microg/branding/mmt/mipmap-xxhdpi/ic_microg_launcher.png b/src/main/resources/microg/branding/mmt/mipmap-xxhdpi/ic_microg_launcher.png new file mode 100644 index 000000000..459bfed2f Binary files /dev/null and b/src/main/resources/microg/branding/mmt/mipmap-xxhdpi/ic_microg_launcher.png differ diff --git a/src/main/resources/microg/branding/mmt/mipmap-xxxhdpi/ic_microg_launcher.png b/src/main/resources/microg/branding/mmt/mipmap-xxxhdpi/ic_microg_launcher.png new file mode 100644 index 000000000..8029f614d Binary files /dev/null and b/src/main/resources/microg/branding/mmt/mipmap-xxxhdpi/ic_microg_launcher.png differ diff --git a/src/main/resources/microg/materialyou/values-v31/styles.xml b/src/main/resources/microg/materialyou/values-v31/styles.xml new file mode 100644 index 000000000..b69da673c --- /dev/null +++ b/src/main/resources/microg/materialyou/values-v31/styles.xml @@ -0,0 +1,258 @@ + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/youtube/settings/xml/revanced_prefs.xml b/src/main/resources/youtube/settings/xml/revanced_prefs.xml index 9dbd7b963..10d3e8e01 100644 --- a/src/main/resources/youtube/settings/xml/revanced_prefs.xml +++ b/src/main/resources/youtube/settings/xml/revanced_prefs.xml @@ -281,7 +281,7 @@ - +