From b4f8f1b0913e00dd776cff884a21191bae2f8b00 Mon Sep 17 00:00:00 2001
From: Chethan <76928501+ch3thanhs@users.noreply.github.com>
Date: Fri, 27 Nov 2026 18:51:49 +0530
Subject: [PATCH] docs: Align app icons in README (#99)
---
.github/scripts/generate_patches_readme.py | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/.github/scripts/generate_patches_readme.py b/.github/scripts/generate_patches_readme.py
index 367b2a00f..a8c73623a 100644
--- a/.github/scripts/generate_patches_readme.py
+++ b/.github/scripts/generate_patches_readme.py
@@ -120,7 +120,7 @@ def play_store_link(package_name):
return f"https://play.google.com/store/apps/details?id={package_name}"
-def app_icon(package_name, size):
+def app_icon(package_name, size, *, inline=False):
"""Icon of the app, the "universal" override for the universal patches (no package
name), or an empty string if icons are off or there is no icon.
@@ -131,7 +131,9 @@ def app_icon(package_name, size):
src = icons.get(package_name) if package_name else ICON_OVERRIDES.get("universal")
if not src:
return ""
- return f'
'
+ # GitHub preserves this attribute when rendering inline images.
+ alignment = ' align="absmiddle"' if inline else ""
+ return f'
'
class _NoRedirectHandler(urllib.request.HTTPRedirectHandler):
@@ -293,7 +295,7 @@ def versions_line(targets):
def index_row(index, app_name, package_name, count, labels):
"""One row of the compact README index table."""
app_cell = f"[**{markdown_cell(app_name)}**](PATCHES.md#{app_anchor(app_name, package_name)})"
- icon = app_icon(package_name, 24)
+ icon = app_icon(package_name, 24, inline=True)
if icon:
app_cell = f"{icon} {app_cell}"
version_cell = ", ".join(f"`{escape(label)}`" for label in labels) if labels else "—"