Open tmtbe opened 11 months ago
Describe the bug
let table = TableBuilder::new(ui) .resizable(true) .cell_layout(Layout::centered_and_justified(Direction::TopDown)) .column(Column::auto()) .column(Column::exact(20.0)) .column(Column::initial(200.0).range(40.0..=300.0)) .column(Column::initial(200.0).range(40.0..=300.0)) .column(Column::remainder()) .min_scrolled_height(0.0); table.header(20.0, |mut header| { header.col(|ui| { ui.strong(""); }); header.col(|ui| { ui.strong(""); }); header.col(|ui| { ui.strong("KEY"); }); header.col(|ui| { ui.strong("VALUE"); }); header.col(|ui| { ui.strong("DESCRIPTION"); }); }).body(|mut body|{ for param in data.rest.request.params.iter_mut() { body.row(18.0, |mut row| { row.col(|ui| { ui.checkbox(&mut param.enable,""); }); row.col(|ui| { if ui.button("x").clicked(){ } }); row.col(|ui| { ui.text_edit_singleline(&mut param.key); }); row.col(|ui| { ui.text_edit_singleline(&mut param.value); }); row.col(|ui| { ui.text_edit_singleline(&mut param.desc); }); }); } body.row(18.0, |mut row| { row.col(|ui| { ui.checkbox(&mut self.new_param.enable,""); }); row.col(|ui| { if ui.button("x").clicked(){ } }); row.col(|ui| { ui.text_edit_singleline(&mut self.new_param.key); }); row.col(|ui| { ui.text_edit_singleline(&mut self.new_param.value); }); row.col(|ui| { ui.text_edit_singleline(&mut self.new_param.desc); }); }); });
Table using centered_and_justified layout will cause width and window size mismatch.
Screenshots
Desktop (please complete the following information):
https://github.com/tmtbe/rust-ui.git ,You can view the code here, the specific questions are in ParamsPanel
Describe the bug
Table using centered_and_justified layout will cause width and window size mismatch.
Screenshots
Desktop (please complete the following information):