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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user