fix: use highlight and cursor from cosmic-text editor
This fixes RTL text in the text_editor widget.
This commit is contained in:
parent
1fdd24ab99
commit
e1fc659e64
5 changed files with 57 additions and 188 deletions
|
|
@ -256,15 +256,11 @@ pub fn align(
|
|||
}
|
||||
}
|
||||
|
||||
// TODO: Avoid relayout with some changes to `cosmic-text` (?)
|
||||
if needs_relayout {
|
||||
log::trace!("Relayouting paragraph...");
|
||||
|
||||
buffer.set_size(
|
||||
font_system,
|
||||
Some(min_bounds.width),
|
||||
Some(min_bounds.height),
|
||||
);
|
||||
buffer.set_size(Some(min_bounds.width), Some(min_bounds.height));
|
||||
buffer.shape_until_scroll(font_system, false);
|
||||
}
|
||||
|
||||
min_bounds
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue