summaryrefslogtreecommitdiffstats
path: root/examples/component
diff options
context:
space:
mode:
Diffstat (limited to 'examples/component')
-rw-r--r--examples/component/src/main.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/examples/component/src/main.rs b/examples/component/src/main.rs
index 5625f12a..14d3d9ba 100644
--- a/examples/component/src/main.rs
+++ b/examples/component/src/main.rs
@@ -34,7 +34,6 @@ impl Component {
}
mod numeric_input {
- use iced::alignment::{self, Alignment};
use iced::widget::{button, component, row, text, text_input, Component};
use iced::{Element, Length, Size};
@@ -108,8 +107,7 @@ mod numeric_input {
text(label)
.width(Length::Fill)
.height(Length::Fill)
- .horizontal_alignment(alignment::Horizontal::Center)
- .vertical_alignment(alignment::Vertical::Center),
+ .center(),
)
.width(40)
.height(40)
@@ -130,7 +128,7 @@ mod numeric_input {
.padding(10),
button("+", Event::IncrementPressed),
]
- .align_items(Alignment::Center)
+ .center_y()
.spacing(10)
.into()
}