Update cosmic-text to 0.15 🎉
This commit is contained in:
parent
7b21a4d702
commit
439f4e32ac
5 changed files with 63 additions and 31 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue