customtheme 87202: Fix logo bg color, drop bg field from ctcconfig

This commit is contained in:
ave 2021-08-22 22:34:47 +03:00
parent 91c37ab9d0
commit f58c28410d
4 changed files with 25 additions and 12 deletions

View file

@ -1,7 +1,3 @@
\cp res/mipmap-xxxhdpi/ic_launcher_background.png res/mipmap-hdpi/ic_launcher_background.png
\cp res/mipmap-xxxhdpi/ic_launcher_background.png res/mipmap-xhdpi/ic_launcher_background.png
\cp res/mipmap-xxxhdpi/ic_launcher_background.png res/mipmap-xxhdpi/ic_launcher_background.png
\cp res/mipmap-xxxhdpi/ic_launcher_foreground.png res/mipmap-hdpi/ic_launcher_foreground.png
\cp res/mipmap-xxxhdpi/ic_launcher_foreground.png res/mipmap-xhdpi/ic_launcher_foreground.png
\cp res/mipmap-xxxhdpi/ic_launcher_foreground.png res/mipmap-xxhdpi/ic_launcher_foreground.png

View file

@ -140,13 +140,9 @@ for patch_name in PATCHES:
os.path.join(WORK_APK_PATH, "res", "mipmap-xxxhdpi", "logo_debug.png"))
if BRANCH in DYN_ICONS:
shutil.copyfile(DYN_ICONS[BRANCH]["bg"],
os.path.join(WORK_APK_PATH, "res", "mipmap-xxxhdpi", "ic_launcher_background.png"))
shutil.copyfile(DYN_ICONS[BRANCH]["fg"],
os.path.join(WORK_APK_PATH, "res", "mipmap-xxxhdpi", "ic_launcher_foreground.png"))
elif "default" in ICONS:
shutil.copyfile(DYN_ICONS["default"]["bg"],
os.path.join(WORK_APK_PATH, "res", "mipmap-xxxhdpi", "ic_launcher_background.png"))
shutil.copyfile(DYN_ICONS["default"]["fg"],
os.path.join(WORK_APK_PATH, "res", "mipmap-xxxhdpi", "ic_launcher_foreground.png"))

View file

@ -51,10 +51,8 @@ ICONS = {"ave": "/opt/ctc/gitrepo/resources/icons/ctclogoave.png",
"default": "/opt/ctc/gitrepo/resources/icons/ctclogo.png"}
# Custom dynamic icons, default = applied to all the ones not explicitly stated
DYN_ICONS = {"ave": {"bg": "/opt/ctc/gitrepo/resources/icons/bg.png",
"fg": "/opt/ctc/gitrepo/resources/icons/fg.png"},
"default": {"bg": "/opt/ctc/gitrepo/resources/icons/dcbg.png",
"fg": "/opt/ctc/gitrepo/resources/icons/dcfg.png"}}
DYN_ICONS = {"ave": {"fg": "/opt/ctc/gitrepo/resources/icons/fg.png"},
"default": {"fg": "/opt/ctc/gitrepo/resources/icons/dcfg.png"}}
# Custom app names, default = applied to all the ones not explicitly stated
# Needs to be one word, __ gets replaced with space

View file

@ -45,4 +45,27 @@
<replace sel="resources/color[@name='brand_500_alpha_20']/text()">#335865f2</replace>
</diff>
<diff file="res/mipmap-anydpi-v26/ic_logo_round.xml" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto">
<replace sel="adaptive-icon/background/@android:drawable">@color/primary_500</replace>
</diff>
<diff file="res/mipmap-anydpi-v26/ic_logo_round_beta.xml" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto">
<replace sel="adaptive-icon/background/@android:drawable">@color/primary_500</replace>
</diff>
<diff file="res/mipmap-anydpi-v26/ic_logo_round_canary.xml" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto">
<replace sel="adaptive-icon/background/@android:drawable">@color/primary_500</replace>
</diff>
<diff file="res/mipmap-anydpi-v26/ic_logo_square.xml" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto">
<replace sel="adaptive-icon/background/@android:drawable">@color/primary_500</replace>
</diff>
<diff file="res/mipmap-anydpi-v26/ic_logo_square_beta.xml" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto">
<replace sel="adaptive-icon/background/@android:drawable">@color/primary_500</replace>
</diff>
<diff file="res/mipmap-anydpi-v26/ic_logo_square_canary.xml" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto">
<replace sel="adaptive-icon/background/@android:drawable">@color/primary_500</replace>
</diff>
</diffs>