Use smart horizontal scrollable in markdown::table
This commit is contained in:
parent
57c628839a
commit
6b937fb6e1
1 changed files with 9 additions and 3 deletions
|
|
@ -1430,7 +1430,7 @@ where
|
||||||
{
|
{
|
||||||
use crate::table;
|
use crate::table;
|
||||||
|
|
||||||
table(
|
let table = table(
|
||||||
columns.iter().enumerate().map(move |(i, column)| {
|
columns.iter().enumerate().map(move |(i, column)| {
|
||||||
table::column(
|
table::column(
|
||||||
items(viewer, settings, &column.header),
|
items(viewer, settings, &column.header),
|
||||||
|
|
@ -1459,8 +1459,14 @@ where
|
||||||
)
|
)
|
||||||
.padding_x(settings.spacing.0)
|
.padding_x(settings.spacing.0)
|
||||||
.padding_y(settings.spacing.0 / 2.0)
|
.padding_y(settings.spacing.0 / 2.0)
|
||||||
.separator_x(0)
|
.separator_x(0);
|
||||||
.into()
|
|
||||||
|
scrollable(table)
|
||||||
|
.direction(scrollable::Direction::Horizontal(
|
||||||
|
scrollable::Scrollbar::default(),
|
||||||
|
))
|
||||||
|
.spacing(settings.spacing.0 / 2.0)
|
||||||
|
.into()
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Displays a column of items with the default look.
|
/// Displays a column of items with the default look.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue