Implement From<Option<T>> for Element
This commit is contained in:
parent
dcea10f707
commit
e0d9078334
9 changed files with 110 additions and 74 deletions
|
|
@ -158,15 +158,15 @@ impl Example {
|
|||
.spacing(10)
|
||||
.align_y(Center);
|
||||
|
||||
let crop_controls =
|
||||
column![crop_origin_controls, crop_dimension_controls]
|
||||
.push_maybe(
|
||||
self.crop_error
|
||||
.as_ref()
|
||||
.map(|error| text!("Crop error! \n{error}")),
|
||||
)
|
||||
.spacing(10)
|
||||
.align_x(Center);
|
||||
let crop_controls = column![
|
||||
crop_origin_controls,
|
||||
crop_dimension_controls,
|
||||
self.crop_error
|
||||
.as_ref()
|
||||
.map(|error| text!("Crop error! \n{error}")),
|
||||
]
|
||||
.spacing(10)
|
||||
.align_x(Center);
|
||||
|
||||
let controls = {
|
||||
let save_result =
|
||||
|
|
@ -208,8 +208,8 @@ impl Example {
|
|||
]
|
||||
.spacing(10)
|
||||
.align_x(Center),
|
||||
save_result.map(text)
|
||||
]
|
||||
.push_maybe(save_result.map(text))
|
||||
.spacing(40)
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue