Skip to content

[FEATURE REQUEST] Background image: a picture in the terminal or the window - #62

Open
Dararaaaa wants to merge 1 commit into
ELY-Open-Source:mainfrom
Dararaaaa:feat/background-scope
Open

Dararaaaa wants to merge 1 commit into
ELY-Open-Source:mainfrom
Dararaaaa:feat/background-scope

Conversation

@Dararaaaa

Copy link
Copy Markdown

Type

  • [FEATURE REQUEST]: a new feature or an improvement
  • [BUG REPORT]: a bug fix
  • [Other]: docs, refactoring, CI, dependencies or chores

What and why

Background image used to paint only inside the terminal column. This adds a Picture scope — the terminal's column (default) or the window below the title bar — and moves the picture behind the workspace, so it can lie under the whole window. It is the first of the background customization's reviewable PRs.

  • background_scope joins background_image in settings.json: terminal or window; a file without it keeps the terminal, so existing settings load unchanged.
  • Settings › Appearance gains a "Picture scope" row under Background image.
  • src/workspace/wallpaper.rs paints the window's ground (the theme's background at the background opacity) and the picture over it at the scope's box. A canvas ruler in the terminal column records the body's real bounds — a column's header may hold it wider than its width setting — and asks for another frame when they move; the window's picture starts at the body's top.
  • While a picture is set the columns' glass is 0, so the picture keeps its colors; the ground keeps the title bar and columns as they were. src/app.rs re-dresses the chrome when the picture comes or goes.
  • The old TerminalView backdrop and src/term/backdrop.rs are gone.
  • PRD, AGENTS.md (2026-11-03 decision), tasks/acceptance.md and docs/en_us|zh_cn/features.md updated.

How it was tested

  • cargo fmt --all --check clean.
  • cargo clippy --all-targets -- -D warnings clean.
  • New tests pass: settings::tests::a_picture_lies_under_the_terminal_unless_the_window_is_chosen, workspace::wallpaper::tests::the_terminal_scope_paints_the_terminal_body, workspace::wallpaper::tests::the_window_scope_starts_below_the_title_bar_and_spans_the_window.
  • cargo test: 410 passed, 8 failed — the failures are term::shell::windows_tests::*, term::pty::through_conpty::*, term::herdr::tests::herdr_answers_over_its_pipe and explorer::tests::the_menu_is_added_read_and_removed_under_its_classes, which spawn real shells through ConPTY and write the registry; the sandbox this was built in denies both (exit code 0xc0000142, no folder within 30 seconds). None touches this change; please re-run them in a normal session.
  • Ran the app with a picture twice, "background_scope": "terminal" and "window": the picture covered the terminal column, then the whole window below the title bar, with the columns transparent over it and the title bar on the ground (screenshots below).

Screenshots

Terminal scope Window scope
terminal-scope window-scope

Checklist

  • The title starts with [FEATURE REQUEST], [BUG REPORT] or [Other]
  • Tests and the build pass locally
  • Docs are updated if behaviour changed

Background image gains a Picture scope: the terminal's column, the
default, or the window below the title bar. Settings › Appearance shows
the choice beside the image.

The picture paints behind the workspace from src/workspace/wallpaper.rs,
over the window's ground — the theme's background at the background
opacity — so the columns can leave their glass at 0 while a picture is
set, and the picture keeps its colors. A canvas ruler records the
terminal body's bounds, since a column's header may hold it wider than
its width setting, and asks for another frame when they move; the
window's picture starts below the title bar from those bounds. The old
TerminalView backdrop is gone.

settings.json gains background_scope (terminal or window); a file without
it keeps the terminal. Tests cover the default and round trip, and both
boxes. PRD, AGENTS.md, tasks/acceptance.md and the feature docs say so.
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.

2 participants