Repository navigation
Conversation
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.
[FEATURE REQUEST] Background: a gradient over the picture
Type
What and why
The picture can now wear a gradient over it, as CSS's
linear-gradientdoes: an angle, a start color and an end color, in Settings › Appearance › Background.background_gradientswitches it (falseby default).background_gradient_angleturns it: 0 draws upward, and degrees increase clockwise, 0 to 360 (180.0by default, top to bottom).background_gradient_fromandbackground_gradient_toare its colors, read bysrc/settings/color.rs:#rgb,#rrggbb,#rrggbbaa,rgb(...),rgba(...),transparent,blackandwhite(#00000000both by default).#202030ccnever lands in a float's noise).The gradient paints over the picture, across the picture's box — the terminal's column or the whole window, as Picture scope says — at the background opacity. gpui draws two stops only, so two colors are all.
validate()refuses an angle outside 0 to 360 and a color that does not read: the row shows why under the field and the saved value stays.How it was tested
upstream/main(fdca49a, which already carries PR1 and PR2) as18512c7; the wallpaper, PRD, AGENTS, acceptance and both feature docs were merged against the T163/T164 changes already on main.cargo build,cargo fmt --all -- --checkclean,cargo clippy --all-targets -- -D warningsclean.cargo test --lib: 443 passed; the 8 failures are the suite's sandbox-bound shell and registry tests, as on main.settings::color(each hex form, rgb/rgba, what is not a color),settings::tests::a_gradient_keeps_its_angle_and_colors(defaults, an angle and colors read back, a bad color refused), and the wallpaper's gradient tests.background_gradient: true, angle 180 and#202030ccto#00000000, the picture dims toward the bottom; with#ff0000ccthe gradient tints it red at the top, so it paints over the picture.Screenshots
Checklist
scripts/check.sh: fmt, clippy and tests clean, the sandbox's 8 known failures aside.PRD.md,AGENTS.mdandtasks/acceptance.mdupdated.