div centering works but there's a bug
This commit is contained in:
+4
-3
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user