Add helper functions for alignment to widget module
This commit is contained in:
parent
75a6f32a5e
commit
f8337b8da7
12 changed files with 208 additions and 64 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue