diff options
author | 2025-01-24 15:55:24 +0100 | |
---|---|---|
committer | 2025-01-24 15:55:24 +0100 | |
commit | f8337b8da7ff6bcf876b54d1c7dac460d2e03747 (patch) | |
tree | 495d96fc62b23af7ce2622e87892ca823f1c61fc /examples/bezier_tool | |
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/bezier_tool')
-rw-r--r-- | examples/bezier_tool/src/main.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/examples/bezier_tool/src/main.rs b/examples/bezier_tool/src/main.rs index e8f0efc9..4d438bd9 100644 --- a/examples/bezier_tool/src/main.rs +++ b/examples/bezier_tool/src/main.rs @@ -1,6 +1,6 @@ //! This example showcases an interactive `Canvas` for drawing Bézier curves. -use iced::widget::{button, container, horizontal_space, hover}; -use iced::{Element, Fill, Theme}; +use iced::widget::{button, container, horizontal_space, hover, right}; +use iced::{Element, Theme}; pub fn main() -> iced::Result { iced::application("Bezier Tool - Iced", Example::update, Example::view) @@ -41,13 +41,12 @@ impl Example { if self.curves.is_empty() { container(horizontal_space()) } else { - container( + right( button("Clear") .style(button::danger) .on_press(Message::Clear), ) .padding(10) - .align_right(Fill) }, )) .padding(20) |