summaryrefslogtreecommitdiff
path: root/src/layout
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2021-11-24 17:00:10 +0100
committerLaurenz <laurmaedje@gmail.com>2021-11-24 17:00:10 +0100
commit304d9dd1107504f3925c2593dd279ea6616defab (patch)
tree1af3bd9c68659d1a644e40a50a31e6688267400a /src/layout
parent8a88f71cb11565c1a78bd57f02a8df17cb2bf7a0 (diff)
Small style changes
Diffstat (limited to 'src/layout')
-rw-r--r--src/layout/mod.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/layout/mod.rs b/src/layout/mod.rs
index a491789a..405e4e83 100644
--- a/src/layout/mod.rs
+++ b/src/layout/mod.rs
@@ -106,7 +106,7 @@ impl PackedNode {
/// Force a size for this node.
pub fn sized(self, sizing: Spec<Option<Linear>>) -> Self {
if sizing.any(Option::is_some) {
- SizedNode { child: self, sizing }.pack()
+ SizedNode { sizing, child: self }.pack()
} else {
self
}
@@ -115,7 +115,7 @@ impl PackedNode {
/// Set alignments for this node.
pub fn aligned(self, aligns: Spec<Option<Align>>) -> Self {
if aligns.any(Option::is_some) {
- AlignNode { child: self, aligns }.pack()
+ AlignNode { aligns, child: self }.pack()
} else {
self
}
@@ -128,7 +128,7 @@ impl PackedNode {
|| !padding.right.is_zero()
|| !padding.bottom.is_zero()
{
- PadNode { child: self, padding }.pack()
+ PadNode { padding, child: self }.pack()
} else {
self
}
@@ -145,7 +145,7 @@ impl PackedNode {
/// Transform this node's contents without affecting layout.
pub fn transformed(self, transform: Transform, origin: Spec<Align>) -> Self {
if !transform.is_identity() {
- TransformNode { child: self, transform, origin }.pack()
+ TransformNode { transform, origin, child: self }.pack()
} else {
self
}