Reorganize element-related traits
This commit is contained in:
parent
ca1d9dd0e5
commit
c23f17ee0b
42 changed files with 190 additions and 265 deletions
|
@ -2,8 +2,8 @@ use smallvec::SmallVec;
|
|||
use taffy::style::{Display, Position};
|
||||
|
||||
use crate::{
|
||||
point, AnyElement, BorrowWindow, Bounds, Element, LayoutId, ParentElement, Pixels, Point,
|
||||
RenderOnce, Size, Style, WindowContext,
|
||||
point, AnyElement, BorrowWindow, Bounds, Element, IntoElement, LayoutId, ParentElement, Pixels,
|
||||
Point, Size, Style, WindowContext,
|
||||
};
|
||||
|
||||
pub struct OverlayState {
|
||||
|
@ -151,14 +151,14 @@ impl Element for Overlay {
|
|||
}
|
||||
}
|
||||
|
||||
impl RenderOnce for Overlay {
|
||||
impl IntoElement for Overlay {
|
||||
type Element = Self;
|
||||
|
||||
fn element_id(&self) -> Option<crate::ElementId> {
|
||||
None
|
||||
}
|
||||
|
||||
fn render_once(self) -> Self::Element {
|
||||
fn into_element(self) -> Self::Element {
|
||||
self
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue