feat(theme): fix table row backgrounds and hub text contrast
This commit is contained in:
+9
-8
@@ -4673,15 +4673,16 @@ def render_heavy_text(app: App, label: str, content: str, id_suffix: str = "") -
|
||||
ctx_id = f"{label}_{id_suffix}"
|
||||
is_md = label in ('message', 'text', 'content', 'system')
|
||||
with imscope.indent():
|
||||
with imscope.child(f"heavy_text_child_{label}_{id_suffix}", imgui.ImVec2(0, 300), imgui.WindowFlags_.always_vertical_scrollbar):
|
||||
if is_md:
|
||||
markdown_helper.render(content, context_id=ctx_id)
|
||||
else:
|
||||
if app.ui_word_wrap:
|
||||
with imscope.text_wrap(imgui.get_content_region_avail().x):
|
||||
imgui.text(content)
|
||||
with imscope.style_color(imgui.Col_.child_bg, theme.get_table_color(is_alt=True)):
|
||||
with imscope.child(f"heavy_text_child_{label}_{id_suffix}", imgui.ImVec2(0, 300), imgui.WindowFlags_.always_vertical_scrollbar):
|
||||
if is_md:
|
||||
markdown_helper.render(content, context_id=ctx_id)
|
||||
else:
|
||||
imgui.text(content)
|
||||
if app.ui_word_wrap:
|
||||
with imscope.text_wrap(imgui.get_content_region_avail().x):
|
||||
imgui.text_colored(theme.get_color("text"), content)
|
||||
else:
|
||||
imgui.text_colored(theme.get_color("text"), content)
|
||||
|
||||
|
||||
#endregion: Misc Tools
|
||||
|
||||
Reference in New Issue
Block a user