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:
@@ -213,6 +213,27 @@ def main():
|
||||
f"frame-text: {text[-200:]!r}")
|
||||
app.send({"type": "close_window", "window_id": emoji_open["id"]})
|
||||
|
||||
# ── 4b2. Resize får inte radera fönstrets innehåll ───────────────
|
||||
app.send({"type": "spawn_window",
|
||||
"command": "printf 'RESIZE-KEEP\\n'; exec cat",
|
||||
"request_id": "w-resize"})
|
||||
rz_open = app.recv_until("window_opened")
|
||||
disp.frame_text(timeout=5.0, contains="RESIZE-KEEP")
|
||||
app.send({"type": "list_windows", "request_id": "lr"})
|
||||
wlr = app.recv_until("window_list")
|
||||
rw = next(w for w in wlr["windows"] if w["id"] == rz_open["id"])
|
||||
# dra i nedre högra hörnet: krymp fönstret 4 kolumner/2 rader
|
||||
corner_x = rw["x"] + rw["width"] - 1
|
||||
corner_y = rw["y"] + rw["height"] - 1
|
||||
disp.send(mouse_event({"Down": "Left"}, corner_x, corner_y))
|
||||
disp.send(mouse_event({"Drag": "Left"}, corner_x - 4, corner_y - 2))
|
||||
disp.send(mouse_event({"Up": "Left"}, corner_x - 4, corner_y - 2))
|
||||
time.sleep(0.5)
|
||||
text = disp.frame_text(timeout=5.0, contains="RESIZE-KEEP")
|
||||
check("innehållet överlever fönster-resize", "RESIZE-KEEP" in text,
|
||||
f"frame-tail: {text[-200:]!r}")
|
||||
app.send({"type": "close_window", "window_id": rz_open["id"]})
|
||||
|
||||
# ── 4c. Scrollback: mushjul utan mus-tracking scrollar historiken ─
|
||||
app.send({"type": "spawn_window",
|
||||
"command": "seq 1 200; exec cat",
|
||||
|
||||
Reference in New Issue
Block a user