mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-18 08:02:27 +00:00
Checkpoint
This commit is contained in:
parent
bb348c1353
commit
c126ff10a7
6 changed files with 6 additions and 6 deletions
|
@ -61,7 +61,7 @@ where
|
|||
let child_layout_ids = style.apply_text_style(cx, |cx| {
|
||||
self.with_element_id(cx, |this, cx| this.layout_children(view, cx))
|
||||
});
|
||||
let layout_id = cx.request_layout(style.into(), child_layout_ids.clone());
|
||||
let layout_id = cx.request_layout(&style, child_layout_ids.clone());
|
||||
(layout_id, ())
|
||||
}
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ impl<S: Send + Sync + 'static> Element for Img<S> {
|
|||
Self: Sized,
|
||||
{
|
||||
let style = self.computed_style();
|
||||
let layout_id = cx.request_layout(style, []);
|
||||
let layout_id = cx.request_layout(&style, []);
|
||||
(layout_id, ())
|
||||
}
|
||||
|
||||
|
|
|
@ -134,7 +134,7 @@ impl<V: 'static + Send + Sync, K: ElementKind> Element for LayoutNodeElement<V,
|
|||
.map(|child| child.layout(state, cx))
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
let style = this.computed_style().clone();
|
||||
let style = this.computed_style();
|
||||
let layout_id = cx.request_layout(style, layout_ids);
|
||||
(layout_id, ())
|
||||
})
|
||||
|
|
|
@ -53,7 +53,7 @@ impl<S: 'static + Send + Sync> Element for Svg<S> {
|
|||
Self: Sized,
|
||||
{
|
||||
let style = self.computed_style();
|
||||
(cx.request_layout(style, []), ())
|
||||
(cx.request_layout(&style, []), ())
|
||||
}
|
||||
|
||||
fn paint(
|
||||
|
|
|
@ -28,7 +28,7 @@ impl TaffyLayoutEngine {
|
|||
|
||||
pub fn request_layout(
|
||||
&mut self,
|
||||
style: Style,
|
||||
style: &Style,
|
||||
rem_size: Pixels,
|
||||
children: &[LayoutId],
|
||||
) -> LayoutId {
|
||||
|
|
|
@ -248,7 +248,7 @@ impl<'a, 'w> WindowContext<'a, 'w> {
|
|||
|
||||
pub fn request_layout(
|
||||
&mut self,
|
||||
style: Style,
|
||||
style: &Style,
|
||||
children: impl IntoIterator<Item = LayoutId>,
|
||||
) -> LayoutId {
|
||||
self.app.layout_id_buffer.clear();
|
||||
|
|
Loading…
Reference in a new issue