From f8337b8da7ff6bcf876b54d1c7dac460d2e03747 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Fri, 24 Jan 2025 15:55:24 +0100 Subject: Add helper functions for alignment to `widget` module --- examples/bezier_tool/src/main.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'examples/bezier_tool/src') 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) -- cgit