feat(theme): finalize semantic color lift and fix light theme UI elements
This commit is contained in:
+3
-3
@@ -1510,8 +1510,8 @@ def render_cache_panel(app: App) -> None:
|
||||
imgui.text(f"Age: {age_str}")
|
||||
imgui.text(f"TTL: {remaining_str} ({ttl_pct:.0f}%)")
|
||||
color = theme.get_color("status_success")
|
||||
if ttl_pct < 20: color = imgui.ImVec4(1.0, 0.2, 0.2, 1.0)
|
||||
elif ttl_pct < 50: color = imgui.ImVec4(1.0, 0.8, 0.0, 1.0)
|
||||
if ttl_pct < 20: color = theme.get_color("status_error")
|
||||
elif ttl_pct < 50: color = theme.get_color("status_warning")
|
||||
imgui.push_style_color(imgui.Col_.plot_histogram, color)
|
||||
imgui.progress_bar(ttl_pct / 100.0, imgui.ImVec2(-1, 0), f"{ttl_pct:.0f}%")
|
||||
imgui.pop_style_color()
|
||||
@@ -1519,7 +1519,7 @@ def render_cache_panel(app: App) -> None:
|
||||
app.controller.clear_cache()
|
||||
app._cache_cleared_timestamp = time.time()
|
||||
if hasattr(app, '_cache_cleared_timestamp') and time.time() - app._cache_cleared_timestamp < 5:
|
||||
imgui.text_colored(imgui.ImVec4(0.2, 1.0, 0.2, 1.0), "Cache cleared - will rebuild on next request")
|
||||
imgui.text_colored(theme.get_color("status_success"), "Cache cleared - will rebuild on next request")
|
||||
if app.perf_profiling_enabled: app.perf_monitor.end_component("_render_cache_panel")
|
||||
|
||||
def render_tool_analytics_panel(app: App) -> None:
|
||||
|
||||
@@ -320,6 +320,15 @@ class MarkdownRenderer:
|
||||
editor = ed.TextEditor()
|
||||
editor.set_read_only_enabled(True)
|
||||
editor.set_show_line_numbers_enabled(True)
|
||||
|
||||
# Explicitly set palette on instance to be sure
|
||||
from src import theme_2
|
||||
p_name = theme_2.get_syntax_palette_for_theme(theme_2.get_current_palette())
|
||||
if hasattr(ed.TextEditor, "PaletteId"):
|
||||
p_id = getattr(ed.TextEditor.PaletteId, p_name, None)
|
||||
if p_id is not None:
|
||||
editor.set_palette(p_id)
|
||||
|
||||
self._editor_cache[cache_key] = editor
|
||||
self._editor_lang_cache[cache_key] = None
|
||||
|
||||
|
||||
Reference in New Issue
Block a user