Skip to content

Commit

Permalink
fix center_x/center_y
Browse files Browse the repository at this point in the history
  • Loading branch information
edouardparis committed Jan 23, 2025
1 parent b8f0a85 commit 1494d6d
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 23 deletions.
3 changes: 1 addition & 2 deletions liana-gui/src/app/view/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,8 @@ pub fn dashboard<'a, T: Into<Element<'a, Message>>>(
.max_width(1500),
Space::with_width(Length::FillPortion(1)),
)))
.center_x()
.center_x(Length::Fill)
.style(theme::Container::Background)
.width(Length::Fill)
.height(Length::Fill),
)
.width(Length::FillPortion(10)),
Expand Down
6 changes: 1 addition & 5 deletions liana-gui/src/app/view/receive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -231,11 +231,7 @@ pub fn qr_modal<'a>(qr: &'a qr_code::Data, address: &'a String) -> Element<'a, M
.push(Space::with_width(Length::Fill)),
)
.push(Space::with_height(Length::Fixed(15.0)))
.push(
Container::new(text(address).size(15))
.width(Length::Fill)
.center_x(),
)
.push(Container::new(text(address).size(15)).center_x(Length::Fill))
.width(Length::Fill)
.max_width(400)
.into()
Expand Down
14 changes: 4 additions & 10 deletions liana-gui/src/installer/view/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1893,8 +1893,7 @@ pub fn login(progress: (usize, usize), connection_step: Element<Message>) -> Ele
.push(h2("Liana Connect"))
.push(connection_step),
)
.width(Length::Fill)
.center_x(),
.center_x(Length::Fill),
true,
Some(Message::Previous),
)
Expand Down Expand Up @@ -2027,17 +2026,12 @@ fn layout<'a>(
.push(
Row::new()
.align_y(Alignment::Center)
.push(
Container::new(prev_button)
.width(Length::FillPortion(2))
.center_x(),
)
.push(Container::new(prev_button).center_x(Length::FillPortion(2)))
.push(Container::new(h3(title)).width(Length::FillPortion(8)))
.push_maybe(if progress.1 > 0 {
Some(
Container::new(text(format!("{} | {}", progress.0, progress.1)))
.width(Length::FillPortion(2))
.center_x(),
.center_x(Length::FillPortion(2)),
)
} else {
None
Expand Down Expand Up @@ -2065,7 +2059,7 @@ fn layout<'a>(
}),
),
))
.center_x()
.center_x(Length::Fill)
.height(Length::Fill)
.width(Length::Fill)
.style(theme::Container::Background)
Expand Down
3 changes: 1 addition & 2 deletions liana-gui/src/launcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -305,8 +305,7 @@ impl Launcher {
})
.max_width(500),
)
.width(Length::Fill)
.center_x(),
.center_x(Length::Fill),
)
.push(Space::with_height(Length::Fixed(100.0))),
))
Expand Down
6 changes: 2 additions & 4 deletions liana-gui/src/lianalite/login.rs
Original file line number Diff line number Diff line change
Expand Up @@ -456,10 +456,8 @@ impl LianaLiteLogin {
}),
)
.padding(50)
.width(Length::Fill)
.height(Length::Fill)
.center_x()
.center_y(),
.center_x(Length::Fill)
.center_y(Length::Fill),
)
.map(Message::View);

Expand Down

0 comments on commit 1494d6d

Please sign in to comment.