Remove unnecessary Container in bezier_tool
This commit is contained in:
parent
e65585ae17
commit
7f1e7aea07
1 changed files with 3 additions and 10 deletions
|
|
@ -1,7 +1,6 @@
|
||||||
//! This example showcases an interactive `Canvas` for drawing Bézier curves.
|
//! This example showcases an interactive `Canvas` for drawing Bézier curves.
|
||||||
use iced::{
|
use iced::{
|
||||||
button, Align, Button, Column, Container, Element, Length, Sandbox,
|
button, Align, Button, Column, Element, Length, Sandbox, Settings, Text,
|
||||||
Settings, Text,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
pub fn main() {
|
pub fn main() {
|
||||||
|
|
@ -49,7 +48,7 @@ impl Sandbox for Example {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn view(&mut self) -> Element<Message> {
|
fn view(&mut self) -> Element<Message> {
|
||||||
let content = Column::new()
|
Column::new()
|
||||||
.padding(20)
|
.padding(20)
|
||||||
.spacing(20)
|
.spacing(20)
|
||||||
.align_items(Align::Center)
|
.align_items(Align::Center)
|
||||||
|
|
@ -63,13 +62,7 @@ impl Sandbox for Example {
|
||||||
Button::new(&mut self.button_state, Text::new("Clear"))
|
Button::new(&mut self.button_state, Text::new("Clear"))
|
||||||
.padding(8)
|
.padding(8)
|
||||||
.on_press(Message::Clear),
|
.on_press(Message::Clear),
|
||||||
);
|
)
|
||||||
|
|
||||||
Container::new(content)
|
|
||||||
.width(Length::Fill)
|
|
||||||
.height(Length::Fill)
|
|
||||||
.center_x()
|
|
||||||
.center_y()
|
|
||||||
.into()
|
.into()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue