Repository navigation
[FEATURE REQUEST] Background: pictures across the whole window, field by field, in the terminal or the window - #58
Conversation
…ting `background_style`, one CSS-like string, is gone: settings.json holds the background as `background`, with color, image, size, position, repeat, gradient, opacity and mask as separate fields, each saved and validated on its own and each with its own control in Settings > Appearance. A file written before still loads, its string read once into those fields. The picture paints the whole window, behind the columns as behind the terminal, with the window's opacity over it, so a background no longer makes the window opaque; the columns' glass gives way while it paints, so the theme grounds it and the picture keeps its colors. The terminal's own backdrop module is gone.
A background's scope says where it paints: behind the terminal column unless the window is chosen, or across the window below the title bar. The title bar keeps the theme's ground either way, and the columns' glass still gives way. A file saved without a scope paints the terminal.
…no picture wider The columns' headers may hold a column wider than its setting, so a background measured from the settings ran past the terminal under the right panel. A canvas over the terminal's body records its real box each frame; the picture takes that box, and the settings' widths only stand in for the first frame. The title bar still paints no picture.
|
Thank you for this. The window-wide picture and its fields are work we'd like to have. As it stands the PR is too large to review and merge as one piece: 2,739 additions and 153 deletions across 28 files, and main has moved under it since (profiles, the CJK font, the font weight, the cursor glide and the Files tab all touch Could you cut it into smaller PRs, each one reviewable alone?
Each PR should also keep to the house rules: files at or under 500 lines, comments one short line, I'll leave this PR open as the reference while the pieces come in. |
|
Two of the pieces are in main now, with you as their author:
The gradient, and the opacity and mask, are still to come, each in its own PR as before. This PR stays open as the reference until they land. |
|
The opacity and the mask are in main now too, with you as their author, from #88: 2e163b7, 1fb7b0e and 5bccbcb, with fixes on top that #88's thread lists. With #62, #65 and #81 that is every part of this PR, and all of it ships in 0.2.4. Closing it as the reference it was kept for. Thank you for splitting it up and seeing each part through. |
[FEATURE REQUEST] Background: pictures across the whole window, field by field, in the terminal or the window
Type
What and why
The background was one CSS-like string (
background_style) and one picturepath, painted by a per-terminal backdrop. It is now stored field by field in
settings.json— picture, color, size, position, repeat, scope, gradient,opacity and mask — each saved and validated on its own, each with its own
control in Settings › Appearance › Background, and painted behind the
terminal or across the window below the title bar.
The title bar never paints the picture and keeps the theme's ground, so its
style matches the rest of the chrome; the picture's scope defaults to the
terminal. The painted stack follows the window's opacity, so a picture no
longer makes the window opaque. A file written before this change still
loads:
background_styleandbackground_imageare read once into the newfields.
Screenshots
The same picture before and after the background became fields: both paint
behind the terminal, the title bar and the columns stay on the theme's
ground, and the second one is under
background.opacityandbackground.mask.The window scope is the same painting across the window below the title bar;
it is laid out by the same box code and covered by the unit tests.
How it was tested
cargo clippy --all-targets -- -D warnings,rustfmt --checkandcargo build(dev) pass.cargo test --lib— the settings, background, wallpaper and i18n testspass, including: the new
scopedefault and round trip, the oldbackground_style/background_imagemigration, the per-field validationerrors, three box tests for the terminal/window scope (hidden columns, a
squeezed window, a title bar taller than the window), and the rule that the
measured terminal body wins over the settings' column widths.
backgroundobject; Settings ›Appearance shows one control per field and saves each on its own; an older
settings file is migrated on load; the opacity slider fades the painted
stack; the title bar shows no picture; a real picture paints behind the
terminal and across the window (screenshots above).
Checklist
[FEATURE REQUEST],[BUG REPORT]or[Other]