Refactor default.py to standardize top padding for text elements in profile card rendering, ensuring consistent alignment of balance and level text. Move level text positioning to improve layout aesthetics and readability.
Some checks are pending
Run pre-commit / Run pre-commit (push) Waiting to run

This commit is contained in:
Valerie 2025-05-26 22:18:38 -04:00
parent 9d7a65dec2
commit 01e08ea4cd

View file

@ -218,11 +218,7 @@ def generate_default_profile(
# Stats positioning - progress bar starts after profile, stats on right
left_edge = pfp_x + pfp_size[0] + 30 # Start progress bar after profile picture
stats_x = desired_card_size[0] - 400 # Right side stats position
<<<<<<< HEAD
top_padding = 20 # Reduced top padding for higher text placement
=======
top_padding = 40 # Consistent top padding for all text
>>>>>>> 3ecf002 (Refactor default.py to standardize top padding for text elements in profile card rendering, ensuring consistent alignment of balance and level text. Move level text positioning to improve layout aesthetics and readability.)
# Draw stats with consistent spacing
title_font = ImageFont.truetype(str(font_path or imgtools.DEFAULT_FONT), 32)
@ -511,3 +507,4 @@ if __name__ == "__main__":
)
result_path = imgtools.ASSETS / "tests" / "result.gif"
result_path.write_bytes(res)