diff options
author | 2025-01-24 15:55:24 +0100 | |
---|---|---|
committer | 2025-01-24 15:55:24 +0100 | |
commit | f8337b8da7ff6bcf876b54d1c7dac460d2e03747 (patch) | |
tree | 495d96fc62b23af7ce2622e87892ca823f1c61fc /examples/integration | |
parent | 75a6f32a5ef49bb8e6d16506d84b07822a33c41b (diff) | |
download | iced-f8337b8da7ff6bcf876b54d1c7dac460d2e03747.tar.gz iced-f8337b8da7ff6bcf876b54d1c7dac460d2e03747.tar.bz2 iced-f8337b8da7ff6bcf876b54d1c7dac460d2e03747.zip |
Add helper functions for alignment to `widget` module
Diffstat (limited to 'examples/integration')
-rw-r--r-- | examples/integration/src/controls.rs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/examples/integration/src/controls.rs b/examples/integration/src/controls.rs index 0b11a323..b92e4987 100644 --- a/examples/integration/src/controls.rs +++ b/examples/integration/src/controls.rs @@ -1,6 +1,6 @@ use iced_wgpu::Renderer; -use iced_widget::{column, container, row, slider, text, text_input}; -use iced_winit::core::{Color, Element, Length::*, Theme}; +use iced_widget::{bottom, column, row, slider, text, text_input}; +use iced_winit::core::{Color, Element, Theme}; use iced_winit::runtime::{Program, Task}; pub struct Controls { @@ -74,18 +74,17 @@ impl Program for Controls { .width(500) .spacing(20); - container( + bottom( column![ text("Background color").color(Color::WHITE), text!("{background_color:?}").size(14).color(Color::WHITE), - text_input("Placeholder", &self.input) - .on_input(Message::InputChanged), sliders, + text_input("Type something...", &self.input) + .on_input(Message::InputChanged), ] .spacing(10), ) .padding(10) - .align_bottom(Fill) .into() } } |