Private
Public Access
0
0

fix(gui): Restore discussion tinting and fix Markdown table width

- Implement layered tinting using draw_list channels in modular discussion renderer.
- Fix vertical squashing of Markdown tables by forcing full group width with a dummy.
- Consolidate color constants into src/ui_shared.py to prevent circular imports.
- Update src/theme_2.py with role-based tint helpers.
- Successfully verified imports and layout logic.
This commit is contained in:
2026-06-02 10:44:45 -04:00
parent 07017e2dd2
commit 46f22f0df9
4 changed files with 106 additions and 71 deletions
+7
View File
@@ -418,6 +418,13 @@ def ai_text_style():
"""Context manager for AI response text styling."""
return imscope.style_color(imgui.Col_.text, ai_text_color())
def get_role_tint(role: str) -> imgui.ImVec4:
"""Returns a subtle background tint color based on the message role."""
if role == "User": return imgui.ImVec4(30/255, 40/255, 60/255, 0.5)
elif role == "AI": return imgui.ImVec4(35/255, 55/255, 45/255, 0.5)
elif role == "Vendor API": return imgui.ImVec4(55/255, 45/255, 30/255, 0.5)
return imgui.ImVec4(25/255, 25/255, 25/255, 0.4)
def render_post_fx(width: float, height: float, ai_status: str, crt_enabled: bool) -> None:
"""Updates and renders the alert and CRT filters."""
_alert_pulsing.update(ai_status)