Return an id from Element::element_id instead of calling cx.with_element_id

Co-Authored-By: Julia <julia@zed.dev>
This commit is contained in:
Nathan Sobo 2023-11-14 16:05:28 -07:00
parent 37d0b8424c
commit bef4df5df9
2 changed files with 209 additions and 204 deletions

View file

@ -9409,14 +9409,17 @@ impl Render for Editor {
EditorMode::Full => cx.theme().colors().editor_background,
};
EditorElement::new(EditorStyle {
background,
local_player: cx.theme().players().local(),
text: text_style,
scrollbar_width: px(12.),
syntax: cx.theme().syntax().clone(),
diagnostic_style: cx.theme().diagnostic_style(),
})
EditorElement::new(
cx.view(),
EditorStyle {
background,
local_player: cx.theme().players().local(),
text: text_style,
scrollbar_width: px(12.),
syntax: cx.theme().syntax().clone(),
diagnostic_style: cx.theme().diagnostic_style(),
},
)
}
}