summaryrefslogtreecommitdiffstats
path: root/examples/loupe/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/loupe/src/main.rs')
-rw-r--r--examples/loupe/src/main.rs12
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
}
}
}