Re-export variants of Length and alignment types
This commit is contained in:
parent
f9dd5cbb09
commit
76737351ea
51 changed files with 255 additions and 395 deletions
|
|
@ -2,7 +2,7 @@ use iced::mouse;
|
|||
use iced::widget::canvas::event::{self, Event};
|
||||
use iced::widget::canvas::{self, Canvas, Geometry};
|
||||
use iced::widget::{column, row, slider, text};
|
||||
use iced::{Color, Length, Point, Rectangle, Renderer, Size, Theme};
|
||||
use iced::{Center, Color, Fill, Point, Rectangle, Renderer, Size, Theme};
|
||||
|
||||
use rand::Rng;
|
||||
use std::fmt::Debug;
|
||||
|
|
@ -50,9 +50,7 @@ impl SierpinskiEmulator {
|
|||
|
||||
fn view(&self) -> iced::Element<'_, Message> {
|
||||
column![
|
||||
Canvas::new(&self.graph)
|
||||
.width(Length::Fill)
|
||||
.height(Length::Fill),
|
||||
Canvas::new(&self.graph).width(Fill).height(Fill),
|
||||
row![
|
||||
text!("Iteration: {:?}", self.graph.iteration),
|
||||
slider(0..=10000, self.graph.iteration, Message::IterationSet)
|
||||
|
|
@ -60,7 +58,7 @@ impl SierpinskiEmulator {
|
|||
.padding(10)
|
||||
.spacing(20),
|
||||
]
|
||||
.center_x()
|
||||
.align_x(Center)
|
||||
.into()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue