Switch to dark theme to match original Streamlit look

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-25 11:33:25 +01:00
parent d5fbfe765e
commit 79a47e034e
2 changed files with 5 additions and 7 deletions

View File

@@ -17,14 +17,12 @@ from tab_comfy_ng import render_comfy_monitor
@ui.page('/')
def index():
# -- Global styling for readability --
ui.query('body').classes('bg-grey-2')
# -- Dark theme to match original Streamlit look --
ui.dark_mode(True)
ui.add_css('''
.q-expansion-item__content { padding: 4px 0; }
.action-row { flex-wrap: wrap !important; gap: 4px !important; }
.q-tab-panels { background: transparent !important; }
.q-textarea .q-field__native { color: #1a1a1a !important; }
.q-input .q-field__native { color: #1a1a1a !important; }
''')
config = load_config()
@@ -88,7 +86,7 @@ def index():
# ------------------------------------------------------------------
# Sidebar (rendered AFTER helpers are attached)
# ------------------------------------------------------------------
with ui.left_drawer().classes('q-pa-md bg-grey-1').style('width: 350px'):
with ui.left_drawer().classes('q-pa-md').style('width: 350px'):
render_sidebar(state)
# ------------------------------------------------------------------

View File

@@ -92,8 +92,8 @@ def render_timeline_tab(state: AppState):
with ui.card().classes(
'w-full q-mb-sm' +
(' bg-amber-2' if is_head else '') +
(' bg-red-2' if is_selected else '')
(' bg-amber-9' if is_head else '') +
(' bg-red-9' if is_selected else '')
):
with ui.row().classes('w-full items-center'):
if selection_mode.value: