Show embedded scrollbars only when necessary in scrollable
This commit is contained in:
parent
7a81e638a3
commit
f78a87c409
3 changed files with 100 additions and 50 deletions
|
|
@ -168,19 +168,17 @@ impl Tour {
|
|||
Screen::End => self.end(),
|
||||
};
|
||||
|
||||
let content: Element<_> = column![screen, controls,]
|
||||
.max_width(540)
|
||||
.spacing(20)
|
||||
.padding(20)
|
||||
.into();
|
||||
let content: Element<_> =
|
||||
column![screen, controls].max_width(540).spacing(20).into();
|
||||
|
||||
let scrollable = scrollable(center_x(if self.debug {
|
||||
content.explain(Color::BLACK)
|
||||
} else {
|
||||
content
|
||||
}));
|
||||
}))
|
||||
.spacing(10);
|
||||
|
||||
center_y(scrollable).into()
|
||||
center_y(scrollable).padding(10).into()
|
||||
}
|
||||
|
||||
fn can_continue(&self) -> bool {
|
||||
|
|
|
|||
|
|
@ -104,6 +104,7 @@ impl WebSocket {
|
|||
)
|
||||
.id(MESSAGE_LOG.clone())
|
||||
.height(Fill)
|
||||
.spacing(10)
|
||||
.into()
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue