refactoring the mixin system
Python CI / test (push) Successful in 6m46s

This commit is contained in:
2025-11-08 08:08:02 +01:00
parent 49d4e551f8
commit ea93681aaf
13 changed files with 676 additions and 350 deletions
+8
View File
@@ -16,6 +16,7 @@ from dataclasses import dataclass
from pyWebLayout.core.base import Renderable, Queriable
from pyWebLayout.concrete.box import Box
from pyWebLayout.abstract.block import Table, TableRow, TableCell, Paragraph, Heading, Image as AbstractImage
from pyWebLayout.abstract.interactive_image import InteractiveImage
from pyWebLayout.style import Font, Alignment
@@ -220,6 +221,13 @@ class TableCellRenderer(Box):
text_y = y + (new_height - 12) // 2
self._draw.text((text_x, text_y), text, fill=(100, 100, 100), font=small_font)
# Set bounds on InteractiveImage objects for tap detection
if isinstance(image_block, InteractiveImage):
image_block.set_rendered_bounds(
origin=(img_x, y),
size=(new_width, new_height)
)
return y + new_height + 5 # Add some spacing after image
except Exception as e: