Re-export variants of Length and alignment types

This commit is contained in:
Héctor Ramón Jiménez 2024-07-12 18:12:34 +02:00
parent f9dd5cbb09
commit 76737351ea
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
51 changed files with 255 additions and 395 deletions

View file

@ -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, Length, Theme};
use iced::{Element, Fill, Theme};
pub fn main() -> iced::Result {
iced::application("Bezier Tool - Iced", Example::update, Example::view)
@ -47,8 +47,7 @@ impl Example {
.on_press(Message::Clear),
)
.padding(10)
.width(Length::Fill)
.align_right()
.align_right(Fill)
},
))
.padding(20)
@ -60,7 +59,7 @@ mod bezier {
use iced::mouse;
use iced::widget::canvas::event::{self, Event};
use iced::widget::canvas::{self, Canvas, Frame, Geometry, Path, Stroke};
use iced::{Element, Length, Point, Rectangle, Renderer, Theme};
use iced::{Element, Fill, Point, Rectangle, Renderer, Theme};
#[derive(Default)]
pub struct State {
@ -73,8 +72,8 @@ mod bezier {
state: self,
curves,
})
.width(Length::Fill)
.height(Length::Fill)
.width(Fill)
.height(Fill)
.into()
}