Merge branch 'gpui2' into marshall/gpui2-playground

This commit is contained in:
Marshall Bowers
2023-10-06 13:45:11 -04:00
34 changed files with 2709 additions and 619 deletions
+3 -4
View File
@@ -1,5 +1,5 @@
use crate::{
AnyElement, Element, IntoAnyElement, Layout, LayoutId, Line, Pixels, Result, Size, ViewContext,
AnyElement, Bounds, Element, IntoAnyElement, LayoutId, Line, Pixels, Result, Size, ViewContext,
};
use parking_lot::Mutex;
use std::{marker::PhantomData, sync::Arc};
@@ -94,7 +94,7 @@ impl<S: 'static> Element for Text<S> {
fn paint<'a>(
&mut self,
layout: Layout,
bounds: Bounds<Pixels>,
_: &mut Self::State,
frame_state: &mut Self::FrameState,
cx: &mut ViewContext<S>,
@@ -111,8 +111,7 @@ impl<S: 'static> Element for Text<S> {
}
// todo!("We haven't added visible bounds to the new element system yet, so this is a placeholder.");
let visible_bounds = layout.bounds;
line.paint(&layout, visible_bounds, line_height, cx)?;
line.paint(bounds, bounds, line_height, cx)?;
Ok(())
}