summaryrefslogtreecommitdiff
path: root/schist_desktop_gui/src/gui/components/table/view_table.rs
diff options
context:
space:
mode:
Diffstat (limited to 'schist_desktop_gui/src/gui/components/table/view_table.rs')
-rw-r--r--schist_desktop_gui/src/gui/components/table/view_table.rs9
1 files changed, 4 insertions, 5 deletions
diff --git a/schist_desktop_gui/src/gui/components/table/view_table.rs b/schist_desktop_gui/src/gui/components/table/view_table.rs
index 33fa0ef..81755dc 100644
--- a/schist_desktop_gui/src/gui/components/table/view_table.rs
+++ b/schist_desktop_gui/src/gui/components/table/view_table.rs
@@ -15,11 +15,10 @@ where
fn view(&'a self) -> iced::Element<'a, Message> {
let headers = row(self.cols.iter().map(|col| {
container(Text::default(&col.name))
- .width(iced::Length::Fixed(128.0))
+ .width(iced::Length::Fixed(col.width))
.into()
}))
- .spacing(SPACING_MD)
- .padding(SPACING_MD);
+ .spacing(SPACING_MD);
let rows = column(self.rows.iter().map(|row_data| {
row(self.cols.iter().map(|col| {
@@ -32,14 +31,14 @@ where
})
.unwrap_or_else(|| Text::default("")),
)
- .width(iced::Length::Fixed(128.0))
+ .width(iced::Length::Fixed(col.width))
.into()
}))
.spacing(SPACING_MD)
.into()
}));
- scrollable(column![headers, rows])
+ scrollable(column![headers, rows].spacing(SPACING_MD))
.direction(ScrollableDirection::Both {
horizontal: Default::default(),
vertical: Default::default(),