Skip to content

add app:theme dark/light switch#4

Merged
hnyls2002 merged 2 commits into
devfrom
lsyin/light-ui-theme
Jul 6, 2026
Merged

add app:theme dark/light switch#4
hnyls2002 merged 2 commits into
devfrom
lsyin/light-ui-theme

Conversation

@hnyls2002

@hnyls2002 hnyls2002 commented Jul 6, 2026

Copy link
Copy Markdown
Owner

What

Adds an app-wide UI theme setting app:theme (dark | light, default dark), exposed as a View → Theme menu toggle.

How

  • Configapp:theme enum setting, wired the same way as app:tabbar.
  • Renderer — an effect sets data-theme on <body> from the setting and live-switches through the config event pipeline (the same path term:theme uses), so no restart is needed.
  • Menu — a Dark/Light radio submenu under View → Theme writes the setting.

Scope

Infrastructure only — no color overrides. [data-theme="light"] has no CSS rules yet, so selecting Light currently inherits the existing dark palette. This isolates the switching pipeline so it can be verified on its own before any palette work.

Verification

View → Theme → Light flips data-theme on <body> live (no restart) and persists to settings.json.

View menu Theme submenu

@hnyls2002 hnyls2002 merged commit 5858c8f into dev Jul 6, 2026
@hnyls2002 hnyls2002 deleted the lsyin/light-ui-theme branch July 6, 2026 23:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant