Feat: better UI in the main view

This commit is contained in:
2026-02-21 16:21:29 +01:00
parent 7207a5fefe
commit 2ba957f2d4
4 changed files with 213 additions and 220 deletions

View File

@@ -62,6 +62,16 @@ pub fn adjust_resolved_for_line(
.collect()
}
pub fn horizontal_padding(width: u16) -> u16 {
if width >= 120 {
4
} else if width >= 80 {
2
} else {
1
}
}
pub fn render(
frame: &mut Frame,
app: &App,
@@ -90,10 +100,11 @@ pub fn render(
return;
}
let h_pad = horizontal_padding(term.width);
let padded = Rect {
x: term.x + 4,
x: term.x + h_pad,
y: term.y + 1,
width: term.width.saturating_sub(8),
width: term.width.saturating_sub(h_pad * 2),
height: term.height.saturating_sub(2),
};