This commit is contained in:
Antonio Scandurra 2023-10-17 13:32:49 +02:00
parent 488d08b43c
commit c04171abf6
16 changed files with 251 additions and 302 deletions

View file

@ -1,6 +1,6 @@
use std::marker::PhantomData;
use gpui3::{Element, ParentElement, StyleHelpers, ViewContext};
use gpui3::{Element, ParentElement, ViewContext};
use crate::{
h_stack, v_stack, Button, Icon, IconButton, IconElement, Label, ThemeColor, Toast, ToastOrigin,

View file

@ -140,9 +140,7 @@ impl<S: 'static + Send + Sync> Panel<S> {
}
impl<S: 'static + Send + Sync> ParentElement for Panel<S> {
type State = S;
fn children_mut(&mut self) -> &mut SmallVec<[AnyElement<Self::State>; 2]> {
fn children_mut(&mut self) -> &mut SmallVec<[AnyElement<Self::ViewState>; 2]> {
&mut self.children
}
}

View file

@ -57,9 +57,7 @@ impl<S: 'static + Send + Sync> Pane<S> {
}
impl<S: 'static + Send + Sync> ParentElement for Pane<S> {
type State = S;
fn children_mut(&mut self) -> &mut SmallVec<[AnyElement<Self::State>; 2]> {
fn children_mut(&mut self) -> &mut SmallVec<[AnyElement<Self::ViewState>; 2]> {
&mut self.children
}
}

View file

@ -62,9 +62,7 @@ impl<S: 'static + Send + Sync> Toast<S> {
}
impl<S: 'static + Send + Sync> ParentElement for Toast<S> {
type State = S;
fn children_mut(&mut self) -> &mut SmallVec<[AnyElement<Self::State>; 2]> {
fn children_mut(&mut self) -> &mut SmallVec<[AnyElement<Self::ViewState>; 2]> {
&mut self.children
}
}