Themes as standalone config files + configurable shadow + dim unfocused + resize content-loss fix
- Theme is now a runtime struct loaded from its own TOML file (theme = "themes/dark.toml" in config.toml, like panels), all fields optional with built-in defaults; ships themes/dark.toml and themes/light.toml - shadow = true/false in config.toml, shadow_color per theme - dim_unfocused (per theme): unfocused window content is dimmed - BUGFIX: resizing a window no longer erases its content and history — the vt100 parser was recreated on every resize; now uses screen_mut().set_size() which preserves the grid and scrollback - New integration check: window content survives mouse resize (20/20) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
19
themes/dark.toml
Normal file
19
themes/dark.toml
Normal file
@@ -0,0 +1,19 @@
|
||||
# TUI-WM standardtema (mörkt).
|
||||
# Välj tema i config.toml: theme = "themes/dark.toml"
|
||||
# Alla fält är valfria — utelämnade fält får inbyggda standardvärden.
|
||||
# Färger: namn ("cyan"), index ("235") eller hex ("#1e1e2e").
|
||||
|
||||
accent = "cyan" # fokusram, logga, markeringar
|
||||
resize = "yellow" # ram under pågående storleksändring
|
||||
resize_hover = "220" # ram vid hover över kant
|
||||
border_dim = "242" # ofokuserad fönsterram
|
||||
desktop_bg = "235" # skrivbordsbakgrund
|
||||
panel_bg = "238" # panelens bakgrund
|
||||
menu_bg = "236" # dropdown-menyns bakgrund
|
||||
text = "white"
|
||||
panel_text = "252"
|
||||
hint = "240"
|
||||
ok = "green"
|
||||
danger = "red"
|
||||
shadow_color = "233" # fönsterskuggans färg
|
||||
dim_unfocused = true # dämpa innehåll i ofokuserade fönster
|
||||
17
themes/light.toml
Normal file
17
themes/light.toml
Normal file
@@ -0,0 +1,17 @@
|
||||
# TUI-WM ljust tema — exempel på eget tema.
|
||||
# Välj i config.toml: theme = "themes/light.toml"
|
||||
|
||||
accent = "blue"
|
||||
resize = "166"
|
||||
resize_hover = "208"
|
||||
border_dim = "249"
|
||||
desktop_bg = "253"
|
||||
panel_bg = "251"
|
||||
menu_bg = "254"
|
||||
text = "black"
|
||||
panel_text = "236"
|
||||
hint = "245"
|
||||
ok = "28"
|
||||
danger = "124"
|
||||
shadow_color = "248"
|
||||
dim_unfocused = true
|
||||
Reference in New Issue
Block a user