diff options
author | 2024-05-13 17:56:02 +0200 | |
---|---|---|
committer | 2024-05-13 17:56:02 +0200 | |
commit | 05f69f495e9b52e9a7d7bada420558d4c4f6730c (patch) | |
tree | 8e1610757754831268ad0bbf5df9c8a4ea78144e /examples/screenshot | |
parent | b30d34f728fdae65d4d2cb0afe2dcade9b4bb0dc (diff) | |
download | iced-05f69f495e9b52e9a7d7bada420558d4c4f6730c.tar.gz iced-05f69f495e9b52e9a7d7bada420558d4c4f6730c.tar.bz2 iced-05f69f495e9b52e9a7d7bada420558d4c4f6730c.zip |
Ask for explicit `Length` in `center_*` methods
Diffstat (limited to 'examples/screenshot')
-rw-r--r-- | examples/screenshot/src/main.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/examples/screenshot/src/main.rs b/examples/screenshot/src/main.rs index 82495a1a..bd670322 100644 --- a/examples/screenshot/src/main.rs +++ b/examples/screenshot/src/main.rs @@ -123,10 +123,9 @@ impl Example { }; let image = container(image) - .center_y() + .center_y(Length::FillPortion(2)) .padding(10) - .style(container::rounded_box) - .width(Length::FillPortion(2)); + .style(container::rounded_box); let crop_origin_controls = row![ text("X:") @@ -211,7 +210,7 @@ impl Example { .spacing(40) }; - let side_content = container(controls).center_y(); + let side_content = container(controls).center_y(Length::Fill); let content = row![side_content, image] .spacing(10) |