chore: update libcosmic and cosmic-text
This commit is contained in:
parent
cf557a0608
commit
6677fe05d5
3 changed files with 391 additions and 601 deletions
982
Cargo.lock
generated
982
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
|
|
@ -60,12 +60,9 @@ impl EditorTab {
|
||||||
let attrs = crate::monospace_attrs();
|
let attrs = crate::monospace_attrs();
|
||||||
let zoom_adj = Default::default();
|
let zoom_adj = Default::default();
|
||||||
let mut buffer = Buffer::new_empty(config.metrics(zoom_adj));
|
let mut buffer = Buffer::new_empty(config.metrics(zoom_adj));
|
||||||
{
|
// Set a minimal size before it is updated by draw
|
||||||
let mut font_system = font_system().write().unwrap();
|
buffer.set_size(Some(0.0), Some(0.0));
|
||||||
// Set a minimal size before it is updated by draw
|
buffer.set_text("", &attrs, Shaping::Advanced, None);
|
||||||
buffer.set_size(font_system.raw(), Some(0.0), Some(0.0));
|
|
||||||
buffer.set_text(font_system.raw(), "", &attrs, Shaping::Advanced, None);
|
|
||||||
}
|
|
||||||
|
|
||||||
let editor = SyntaxEditor::new(
|
let editor = SyntaxEditor::new(
|
||||||
Arc::new(buffer),
|
Arc::new(buffer),
|
||||||
|
|
|
||||||
|
|
@ -455,7 +455,6 @@ where
|
||||||
// Set metrics and size
|
// Set metrics and size
|
||||||
editor.with_buffer_mut(|buffer| {
|
editor.with_buffer_mut(|buffer| {
|
||||||
buffer.set_metrics_and_size(
|
buffer.set_metrics_and_size(
|
||||||
font_system.raw(),
|
|
||||||
metrics,
|
metrics,
|
||||||
Some((image_w - editor_offset_x) as f32),
|
Some((image_w - editor_offset_x) as f32),
|
||||||
Some(image_h as f32),
|
Some(image_h as f32),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue