From da482d1327360f814c0f63f876d655e8001deb10 Mon Sep 17 00:00:00 2001 From: xengineering Date: Wed, 4 Mar 2026 21:07:22 +0100 Subject: icon: Add convert.py for Android Adaptive Icons Android Adaptive Icons allow the OS to display the icon in different variations and styles. For this to work Android requires PNG images with e.g. only the foreground or only the background. The added script can generate these files from main.svg. [1]: https://developer.android.com/develop/ui/views/launch/icon_design_adaptive --- check.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'check.py') diff --git a/check.py b/check.py index 858309c..9c45f4d 100755 --- a/check.py +++ b/check.py @@ -6,9 +6,9 @@ import subprocess import shutil import sys - SCRIPT = pathlib.Path(__file__).resolve() ROOT = SCRIPT.parent +ICON = ROOT / "icon" def main() -> None: @@ -67,7 +67,13 @@ def black() -> None: def get_python_files() -> tuple[pathlib.Path, ...]: - return tuple(ROOT.glob("*.py")) + files: list[pathlib.Path] = [] + + for directory in (ROOT, ICON): + for file in directory.glob("*.py"): + files.append(file) + + return tuple(files) def flutter_analyze() -> None: -- cgit v1.3