Center images
This commit is contained in:
parent
a51f3fa9b5
commit
1c3b2a380a
1 changed files with 4 additions and 1 deletions
|
|
@ -6,7 +6,7 @@ use showbits_common::{
|
||||||
};
|
};
|
||||||
use taffy::{
|
use taffy::{
|
||||||
style_helpers::{length, percent},
|
style_helpers::{length, percent},
|
||||||
AlignItems, FlexDirection,
|
AlignItems, Display, FlexDirection,
|
||||||
};
|
};
|
||||||
use tokio::sync::mpsc;
|
use tokio::sync::mpsc;
|
||||||
|
|
||||||
|
|
@ -136,6 +136,9 @@ impl Drawer {
|
||||||
let root = Node::empty()
|
let root = Node::empty()
|
||||||
.with_size_width(percent(1.0))
|
.with_size_width(percent(1.0))
|
||||||
.with_padding_bottom(length(Self::FEED))
|
.with_padding_bottom(length(Self::FEED))
|
||||||
|
.with_display(Display::Flex)
|
||||||
|
.with_flex_direction(FlexDirection::Column)
|
||||||
|
.with_align_items(Some(AlignItems::Center))
|
||||||
.and_child(image)
|
.and_child(image)
|
||||||
.register(&mut tree)?;
|
.register(&mut tree)?;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue