Revert "Revert recent anti-aliasing improvements (#24289)" and fix selection top right corner radius issue (#24342)
Release Notes: - N/A ---- To fix #24289 mention issue and revert PathBuilder and MSAA. I'm sorry about of this, in #22808 I was forgotten this bit of detail.  So, add `move_to` here, we can fix the selection top right corner radius issue. ## After change <img width="1383" alt="image" src="https://github.com/user-attachments/assets/28ea103c-d652-41d6-bbe0-7fd042d81e77" />
This commit is contained in:
parent
1f2205d75c
commit
f08b1d78ec
13 changed files with 586 additions and 113 deletions
|
@ -218,13 +218,17 @@ impl Render for GradientViewer {
|
|||
let height = square_bounds.size.height;
|
||||
let horizontal_offset = height;
|
||||
let vertical_offset = px(30.);
|
||||
let mut path = gpui::Path::new(square_bounds.bottom_left());
|
||||
path.line_to(square_bounds.origin + point(horizontal_offset, vertical_offset));
|
||||
path.line_to(
|
||||
let mut builder = gpui::PathBuilder::fill();
|
||||
builder.move_to(square_bounds.bottom_left());
|
||||
builder
|
||||
.line_to(square_bounds.origin + point(horizontal_offset, vertical_offset));
|
||||
builder.line_to(
|
||||
square_bounds.top_right() + point(-horizontal_offset, vertical_offset),
|
||||
);
|
||||
path.line_to(square_bounds.bottom_right());
|
||||
path.line_to(square_bounds.bottom_left());
|
||||
|
||||
builder.line_to(square_bounds.bottom_right());
|
||||
builder.line_to(square_bounds.bottom_left());
|
||||
let path = builder.build().unwrap();
|
||||
window.paint_path(
|
||||
path,
|
||||
linear_gradient(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue