summaryrefslogtreecommitdiffstats
path: root/examples/component/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/component/src/main.rs')
-rw-r--r--examples/component/src/main.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/examples/component/src/main.rs b/examples/component/src/main.rs
index b2c71b3f..5625f12a 100644
--- a/examples/component/src/main.rs
+++ b/examples/component/src/main.rs
@@ -1,5 +1,5 @@
-use iced::widget::container;
-use iced::{Element, Length};
+use iced::widget::center;
+use iced::Element;
use numeric_input::numeric_input;
@@ -27,10 +27,8 @@ impl Component {
}
fn view(&self) -> Element<Message> {
- container(numeric_input(self.value, Message::NumericInputChanged))
+ center(numeric_input(self.value, Message::NumericInputChanged))
.padding(20)
- .height(Length::Fill)
- .center_y()
.into()
}
}