mirror of
https://github.com/danog/ytop.git
synced 2024-11-26 20:15:03 +01:00
Temporarily fix table width bug
This commit is contained in:
parent
cb9d508254
commit
851b61e0a9
@ -130,14 +130,20 @@ impl Widget for DiskWidget<'_> {
|
||||
)
|
||||
.block(block::new(self.colorscheme, &self.title))
|
||||
.header_style(self.colorscheme.text.modifier(Modifier::BOLD))
|
||||
.widths(&[
|
||||
Constraint::Min(5),
|
||||
Constraint::Min(5),
|
||||
Constraint::Length(5),
|
||||
Constraint::Length(8),
|
||||
Constraint::Length(8),
|
||||
Constraint::Length(8),
|
||||
])
|
||||
.widths(&if area.width > 55 {
|
||||
vec![
|
||||
// Constraint::Min(5),
|
||||
// Constraint::Min(5),
|
||||
Constraint::Length(u16::max((area.width as i16 - 2 - 50) as u16, 5)),
|
||||
Constraint::Length(u16::max((area.width as i16 - 2 - 50) as u16, 5)),
|
||||
Constraint::Length(5),
|
||||
Constraint::Length(8),
|
||||
Constraint::Length(8),
|
||||
Constraint::Length(8),
|
||||
]
|
||||
} else {
|
||||
vec![Constraint::Length(5), Constraint::Length(5)]
|
||||
})
|
||||
.column_spacing(1)
|
||||
.header_gap(0)
|
||||
.draw(area, buf);
|
||||
|
@ -118,7 +118,8 @@ impl Widget for ProcWidget<'_> {
|
||||
.header_style(self.colorscheme.text.modifier(Modifier::BOLD))
|
||||
.widths(&[
|
||||
Constraint::Length(5),
|
||||
Constraint::Min(5),
|
||||
// Constraint::Min(5),
|
||||
Constraint::Length(u16::max((area.width as i16 - 2 - 18) as u16, 5)),
|
||||
Constraint::Length(5),
|
||||
Constraint::Length(5),
|
||||
])
|
||||
|
Loading…
Reference in New Issue
Block a user