Merge branch 'main' into collab-panel

This commit is contained in:
Mikayla 2023-08-12 12:44:22 -07:00
commit a90c0e0326
No known key found for this signature in database
30 changed files with 410 additions and 100 deletions

View file

@ -174,7 +174,7 @@ pub trait Element<V: View>: 'static {
fn with_tooltip<Tag: 'static>(
self,
id: usize,
text: String,
text: impl Into<Cow<'static, str>>,
action: Option<Box<dyn Action>>,
style: TooltipStyle,
cx: &mut ViewContext<V>,
@ -182,7 +182,7 @@ pub trait Element<V: View>: 'static {
where
Self: 'static + Sized,
{
Tooltip::new::<Tag, V>(id, text, action, style, self.into_any(), cx)
Tooltip::new::<Tag>(id, text, action, style, self.into_any(), cx)
}
fn resizable(
@ -205,6 +205,10 @@ pub trait Element<V: View>: 'static {
}
}
pub trait RenderElement {
fn render<V: View>(&mut self, view: &mut V, cx: &mut ViewContext<V>) -> AnyElement<V>;
}
trait AnyElementState<V: View> {
fn layout(
&mut self,