summaryrefslogtreecommitdiffstats
path: root/examples/stopwatch
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-07-12 18:12:34 +0200
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-07-12 18:12:34 +0200
commit76737351ea9e116291112b7d576d9ed4f6bb5c2a (patch)
treea3b514583ab6f8981fb7656adb9d4d10ce9c466a /examples/stopwatch
parentf9dd5cbb099bbe44a57b6369be54a442363b7a8d (diff)
downloadiced-76737351ea9e116291112b7d576d9ed4f6bb5c2a.tar.gz
iced-76737351ea9e116291112b7d576d9ed4f6bb5c2a.tar.bz2
iced-76737351ea9e116291112b7d576d9ed4f6bb5c2a.zip
Re-export variants of `Length` and `alignment` types
Diffstat (limited to 'examples/stopwatch')
-rw-r--r--examples/stopwatch/src/main.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/stopwatch/src/main.rs b/examples/stopwatch/src/main.rs
index ca7b8f91..0d824d36 100644
--- a/examples/stopwatch/src/main.rs
+++ b/examples/stopwatch/src/main.rs
@@ -1,7 +1,7 @@
use iced::keyboard;
use iced::time;
use iced::widget::{button, center, column, row, text};
-use iced::{Element, Subscription, Theme};
+use iced::{Center, Element, Subscription, Theme};
use std::time::{Duration, Instant};
@@ -101,7 +101,7 @@ impl Stopwatch {
.size(40);
let button =
- |label| button(text(label).center_x()).padding(10).width(80);
+ |label| button(text(label).align_x(Center)).padding(10).width(80);
let toggle_button = {
let label = match self.state {
@@ -118,7 +118,7 @@ impl Stopwatch {
let controls = row![toggle_button, reset_button].spacing(20);
- let content = column![duration, controls].center_x().spacing(20);
+ let content = column![duration, controls].align_x(Center).spacing(20);
center(content).into()
}