diff options
author | 2022-02-11 23:17:07 +0700 | |
---|---|---|
committer | 2022-02-11 23:17:07 +0700 | |
commit | ecb3df8e018930c407e469ce2b8f4208a9d15426 (patch) | |
tree | 9370945e6c5092e2730ec6835fa6c0556622ca9d /examples | |
parent | 01c5004959c9b11f2580840f4553ad7d706f4564 (diff) | |
download | iced-ecb3df8e018930c407e469ce2b8f4208a9d15426.tar.gz iced-ecb3df8e018930c407e469ce2b8f4208a9d15426.tar.bz2 iced-ecb3df8e018930c407e469ce2b8f4208a9d15426.zip |
Expose reusable `Button` logic
... and reuse it in `iced_pure`!
Diffstat (limited to 'examples')
-rw-r--r-- | examples/stopwatch/src/main.rs | 2 | ||||
-rw-r--r-- | examples/tour/src/main.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/examples/stopwatch/src/main.rs b/examples/stopwatch/src/main.rs index dc8a4de7..377d7a2d 100644 --- a/examples/stopwatch/src/main.rs +++ b/examples/stopwatch/src/main.rs @@ -105,8 +105,8 @@ impl Application for Stopwatch { Text::new(label) .horizontal_alignment(alignment::Horizontal::Center), ) - .min_width(80) .padding(10) + .width(Length::Units(80)) .style(style) }; diff --git a/examples/tour/src/main.rs b/examples/tour/src/main.rs index d4b41310..b01a1ce2 100644 --- a/examples/tour/src/main.rs +++ b/examples/tour/src/main.rs @@ -726,7 +726,7 @@ fn button<'a, Message: Clone>( Text::new(label).horizontal_alignment(alignment::Horizontal::Center), ) .padding(12) - .min_width(100) + .width(Length::Units(100)) } fn color_slider( |