WIP
This commit is contained in:
parent
f9858445b8
commit
0fe457020b
8 changed files with 199 additions and 107 deletions
|
@ -1264,17 +1264,17 @@ impl LayoutEngine {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn computed_layout(&mut self, node: LayoutNodeId) -> Result<Layout> {
|
||||
pub fn computed_layout(&mut self, node: LayoutNodeId) -> Result<EngineLayout> {
|
||||
Ok(self.0.layout(node)?.into())
|
||||
}
|
||||
}
|
||||
|
||||
pub struct Layout {
|
||||
pub struct EngineLayout {
|
||||
pub bounds: RectF,
|
||||
pub order: u32,
|
||||
}
|
||||
|
||||
impl From<&taffy::tree::Layout> for Layout {
|
||||
impl From<&taffy::tree::Layout> for EngineLayout {
|
||||
fn from(value: &taffy::tree::Layout) -> Self {
|
||||
Self {
|
||||
bounds: RectF::new(
|
||||
|
|
|
@ -28,7 +28,8 @@ pub mod keymap_matcher;
|
|||
pub mod platform;
|
||||
pub use gpui_macros::{test, Element};
|
||||
pub use window::{
|
||||
Axis, Layout, LayoutEngine, LayoutNodeId, RectFExt, SizeConstraint, Vector2FExt, WindowContext,
|
||||
Axis, EngineLayout, LayoutEngine, LayoutNodeId, RectFExt, SizeConstraint, Vector2FExt,
|
||||
WindowContext,
|
||||
};
|
||||
|
||||
pub use anyhow;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue