Update cosmic-text to 0.15 🎉

This commit is contained in:
Héctor Ramón Jiménez 2025-10-31 16:15:31 +01:00
parent 7b21a4d702
commit 439f4e32ac
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
5 changed files with 63 additions and 31 deletions

View file

@ -56,6 +56,7 @@ impl Cache {
key.content,
&text::to_attributes(key.font),
text::to_shaping(key.shaping, key.content),
None,
);
let bounds = text::align(&mut buffer, font_system, key.align_x);

View file

@ -75,6 +75,7 @@ impl editor::Editor for Editor {
text,
&cosmic_text::Attrs::new(),
cosmic_text::Shaping::Advanced,
None,
);
Editor(Some(Arc::new(Internal {
@ -449,7 +450,10 @@ impl editor::Editor for Editor {
Action::Scroll { lines } => {
editor.action(
font_system.raw(),
cosmic_text::Action::Scroll { lines },
cosmic_text::Action::Scroll {
pixels: lines as f32
* self.buffer().metrics().line_height,
},
);
}
}

View file

@ -89,6 +89,7 @@ impl core::text::Paragraph for Paragraph {
text.content,
&text::to_attributes(text.font),
text::to_shaping(text.shaping, text.content),
None,
);
let min_bounds =