sane focus

This commit is contained in:
🪞👃🪞 2024-06-21 13:52:21 +03:00
parent be2c2df92b
commit 3177e4ab58
2 changed files with 13 additions and 3 deletions

View file

@ -48,7 +48,17 @@ pub fn render (state: &Chain, buf: &mut Buffer, area: Rect)
},
ChainView::Column => {
let (area, areas) = draw_column(&state.items, buf, area, 0)?;
draw_box_styled(buf, area, Some(Style::default().dim()))
draw_box_styled(buf, area, Some(if state.focused {
Style::default().dim()
} else {
Style::default().not_dim()
}));
draw_box_styled(buf, areas[state.focus], Some(if state.focused {
Style::default().green().not_dim()
} else {
Style::default().green().dim()
}));
area
},
})
//let area = Rect { x, y, width: 40, height: 30 };