div centering works but there's a bug

This commit is contained in:
2025-07-03 00:17:24 +02:00
parent a973dbaed1
commit 2b879ad51d
4 changed files with 45 additions and 9 deletions
+4 -3
View File
@@ -20,10 +20,11 @@ fn main() {
let mut d = Div::new();
d.draw("test".to_string());
d.draw("abc".to_string()).component(Transform::center());
d.draw("test".to_string())
.component(Transform::new().margin(20, 0));
d.draw("abcsdsd".to_string());
app.draw(d);
app.draw(d).component(Transform::center());
app.run().unwrap();
}