diff options
author | 2024-05-23 13:29:45 +0200 | |
---|---|---|
committer | 2024-05-23 13:29:45 +0200 | |
commit | d8ba6b0673a33724a177f3a1ba59705527280142 (patch) | |
tree | 89482c8d1e3a03e00b3a8151abbb81e30ae5898c /examples/loupe | |
parent | 72ed8bcc8def9956e25f3720a3095fc96bb2eef0 (diff) | |
parent | 468794d918eb06c1dbebb33c32b10017ad335f05 (diff) | |
download | iced-d8ba6b0673a33724a177f3a1ba59705527280142.tar.gz iced-d8ba6b0673a33724a177f3a1ba59705527280142.tar.bz2 iced-d8ba6b0673a33724a177f3a1ba59705527280142.zip |
Merge branch 'master' into feat/text-macro
Diffstat (limited to 'examples/loupe')
-rw-r--r-- | examples/loupe/src/main.rs | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/examples/loupe/src/main.rs b/examples/loupe/src/main.rs index 6a5ff123..c4d3b449 100644 --- a/examples/loupe/src/main.rs +++ b/examples/loupe/src/main.rs @@ -1,5 +1,5 @@ -use iced::widget::{button, column, container, text}; -use iced::{Alignment, Element, Length}; +use iced::widget::{button, center, column, text}; +use iced::{Alignment, Element}; use loupe::loupe; @@ -31,7 +31,7 @@ impl Loupe { } fn view(&self) -> Element<Message> { - container(loupe( + center(loupe( 3.0, column![ button("Increment").on_press(Message::Increment), @@ -41,10 +41,6 @@ impl Loupe { .padding(20) .align_items(Alignment::Center), )) - .width(Length::Fill) - .height(Length::Fill) - .center_x() - .center_y() .into() } } @@ -159,7 +155,7 @@ mod loupe { if cursor.is_over(layout.bounds()) { mouse::Interaction::ZoomIn } else { - mouse::Interaction::Idle + mouse::Interaction::None } } } |