Add a per-widget text-size picker for calendar/tasks legibility
Calendar and tasks pack the most body text at the smallest default sizes, so those two gear-icon dialogs get a "Text size" card (Normal/ Large/X-Large) alongside the existing Border card -- a new Widget-level font_scale column with its own POST .../font-scale endpoint, same Widget-property-not-config-field shape as border_style. Threaded through every classic (calendar_render.py) and modern (html_render.py/ calendar_html_render.py) size calc via one shared panel_style. scaled_size() so row heights/max_rows already derived from font size re-fit around the bigger text automatically.
This commit is contained in:
@@ -76,9 +76,9 @@ def _capture_build_tasks_title(monkeypatch):
|
||||
seen_titles = []
|
||||
real_build_tasks = widgets.tasks._build_tasks
|
||||
|
||||
def spy(tasks, target_w, target_h, palette_rgb=None, title="Tasks"):
|
||||
def spy(tasks, target_w, target_h, palette_rgb=None, title="Tasks", font_scale=1.0):
|
||||
seen_titles.append(title)
|
||||
return real_build_tasks(tasks, target_w, target_h, palette_rgb, title)
|
||||
return real_build_tasks(tasks, target_w, target_h, palette_rgb, title, font_scale=font_scale)
|
||||
|
||||
monkeypatch.setattr(widgets.tasks, "_build_tasks", spy)
|
||||
return seen_titles
|
||||
|
||||
Reference in New Issue
Block a user