Repository navigation
Conversation
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.
The picture fills its box as CSS's `background-size`, `background-position` and `background-repeat` say: `cover`, `contain`, `fill`, `auto`, or a width and a height such as `51% auto`; a place such as `right top` or `125% 100%`; and no repeat, across, down or both. Settings › Appearance gains Picture size, Picture position and Picture repeat under Picture scope, and a size or a place that does not read says why under its field. `src/settings/picture.rs` holds the model and its parsers; `wallpaper.rs` sizes the picture against its own pixels at the window's scale, places it, and tiles it from before the box, at most 400 tiles.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type
What and why
The second of the split PRs from #58. After the picture learned where it paints
(PR #1:
background_scope, the terminal's column or the window below the titlebar), it now learns how it fills that box: its size, its position and whether
it tiles, in CSS's own words —
cover,contain,fill,autoor a width anda height such as
51% auto; a place such asright topor125% 100%; and norepeat, across, down or both.
Three fields sit beside
background_image—background_size,background_position,background_repeat— so an existingsettings.jsonstill loads unchanged; nothing is migrated, and a file without them takes CSS's
defaults (
cover,center,no-repeat), which is what the picture did before.How it was tested
cargo fmt --all -- --checkandcargo clippy --all-targets -- -D warningspass.cargo test --lib: the picture and the settings' own tests pass —settings::picture13,workspace::wallpaper6,settings::tests17 of 19 —plus the rest of the suite. The two
settings::testsfailures and theConPTY/shell failures come from this sandbox denying temp folders and shell
spawns (
拒绝访问。 (os error 5),exit code: 0xc0000142); the same tests passon a machine that can write its temp folder, as CI does.
"background_size": "51% auto"and"background_position": "125% 100%": it draws at 51% of the box's width,shifted right by 125% of the free space and clipped at the window's edge, as
CSS's
background-position: 125%does.a temporary red ground showed the whole window filled by it, with the picture
over it.
Screenshots
51% auto,125% 100%Checklist
[FEATURE REQUEST],[BUG REPORT]or[Other]