summaryrefslogtreecommitdiff
path: root/src/layout/fixed.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2021-01-03 00:12:09 +0100
committerLaurenz <laurmaedje@gmail.com>2021-01-03 00:12:09 +0100
commitaae67bd572ad86f4c57e364daa51a9dc883b8913 (patch)
tree0aba021e0748ebad2197ea390385ec5f93ccbc6e /src/layout/fixed.rs
parent1c40dc42e7bc7b799b77f06d25414aca59a044ba (diff)
Move and rename many things 🚛
Diffstat (limited to 'src/layout/fixed.rs')
-rw-r--r--src/layout/fixed.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/layout/fixed.rs b/src/layout/fixed.rs
index d0daa2ca..2ec46df3 100644
--- a/src/layout/fixed.rs
+++ b/src/layout/fixed.rs
@@ -3,16 +3,16 @@ use crate::geom::Linear;
/// A node that can fix its child's width and height.
#[derive(Debug, Clone, PartialEq)]
-pub struct Fixed {
+pub struct NodeFixed {
/// The fixed width, if any.
pub width: Option<Linear>,
/// The fixed height, if any.
pub height: Option<Linear>,
/// The child node whose size to fix.
- pub child: LayoutNode,
+ pub child: Node,
}
-impl Layout for Fixed {
+impl Layout for NodeFixed {
fn layout(&self, ctx: &mut LayoutContext, areas: &Areas) -> Layouted {
let Area { rem, full } = areas.current;
let size = Size::new(
@@ -25,8 +25,8 @@ impl Layout for Fixed {
}
}
-impl From<Fixed> for LayoutNode {
- fn from(fixed: Fixed) -> Self {
- Self::dynamic(fixed)
+impl From<NodeFixed> for Node {
+ fn from(fixed: NodeFixed) -> Self {
+ Self::any(fixed)
}
}