chore: adapt latest changes from GPUI and nostr-sdk

This commit is contained in:
2025-01-30 08:03:39 +07:00
parent 72a6d79bc5
commit 82f18fc478
19 changed files with 276 additions and 186 deletions

View File

@@ -271,12 +271,14 @@ impl TextElement {
// print_points_as_svg_path(&line_corners, &points);
let first_p = *points.first().unwrap();
let mut path = gpui::Path::new(bounds.origin + first_p);
let first_p = *points.get(0).unwrap();
let mut builder = gpui::PathBuilder::fill();
builder.move_to(bounds.origin + first_p);
for p in points.iter().skip(1) {
path.line_to(bounds.origin + *p);
builder.line_to(bounds.origin + *p);
}
Some(path)
builder.build().ok()
}
}
@@ -423,7 +425,7 @@ impl Element for TextElement {
let lines = window
.text_system()
.shape_text(display_text, font_size, &runs, wrap_width)
.shape_text(display_text, font_size, &runs, wrap_width, None)
.unwrap();
// `position_for_index` for example