Fix multi_window example scrollable layout
This commit is contained in:
parent
5e5c7c85ad
commit
86311b8914
1 changed files with 8 additions and 9 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
use iced::widget::{
|
use iced::widget::{
|
||||||
button, center, center_x, column, horizontal_space, scrollable, text,
|
button, center, center_x, column, container, horizontal_space, scrollable,
|
||||||
text_input,
|
text, text_input,
|
||||||
};
|
};
|
||||||
use iced::window;
|
use iced::window;
|
||||||
use iced::{
|
use iced::{
|
||||||
|
|
@ -188,13 +188,12 @@ impl Window {
|
||||||
let new_window_button =
|
let new_window_button =
|
||||||
button(text("New Window")).on_press(Message::OpenWindow);
|
button(text("New Window")).on_press(Message::OpenWindow);
|
||||||
|
|
||||||
let content = scrollable(
|
let content = column![scale_input, title_input, new_window_button]
|
||||||
column![scale_input, title_input, new_window_button]
|
.spacing(50)
|
||||||
.spacing(50)
|
.width(Fill)
|
||||||
.width(Fill)
|
.align_x(Center)
|
||||||
.align_x(Center),
|
.width(200);
|
||||||
);
|
|
||||||
|
|
||||||
center_x(content).width(200).into()
|
container(scrollable(center_x(content))).padding(10).into()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue