Wire bg_color parameter through textgrid_tui()

This commit is contained in:
Andrew Hamilton 2026-07-24 12:43:49 +10:00
parent b8cf761db5
commit da9f6e97b7

View file

@ -586,7 +586,7 @@ def _dispatch_key(screen_widget, key):
async def textgrid_tui(title, screen_widget, font_path=None, color_font_path=None,
cols=80, rows=24):
cols=80, rows=24, bg_color=None):
global APPEARANCE_CHANGED_EVENT, SHUTDOWN_EVENT
APPEARANCE_CHANGED_EVENT = asyncio.Event()
SHUTDOWN_EVENT = asyncio.Event()
@ -601,7 +601,7 @@ async def textgrid_tui(title, screen_widget, font_path=None, color_font_path=Non
font_path=font_path, color_font_path=color_font_path,
on_key=on_key, on_close=on_close,
appearance_changed=APPEARANCE_CHANGED_EVENT,
event_loop=loop)
event_loop=loop, bg_color=bg_color)
update_task = asyncio.create_task(_update_screen_textgrid(screen_widget, grid))
try:
await SHUTDOWN_EVENT.wait()