Make active panel in bold

This commit is contained in:
Dheepak Krishnamurthy 2020-10-24 23:52:04 -06:00
parent fe81fc4fa7
commit 5e2eabfba9
4 changed files with 166 additions and 98 deletions

View file

@ -316,10 +316,22 @@ where
x = table_area.left();
for (c, (w, elt)) in solved_widths.iter().zip(data).enumerate() {
let s = if c == 0 {
buf.set_stringn(x, y + i as u16, format!("{symbol:^width$}", symbol="", width=area.width as usize), *w as usize, style);
buf.set_stringn(
x,
y + i as u16,
format!("{symbol:^width$}", symbol = "", width = area.width as usize),
*w as usize,
style,
);
format!("{}{}", symbol, elt)
} else {
buf.set_stringn(x - 1, y + i as u16, format!("{symbol:^width$}", symbol="", width=area.width as usize), *w as usize + 1, style);
buf.set_stringn(
x - 1,
y + i as u16,
format!("{symbol:^width$}", symbol = "", width = area.width as usize),
*w as usize + 1,
style,
);
format!("{}", elt)
};
buf.set_stringn(x, y + i as u16, s, *w as usize, style);