Feat: better UI in the main view
This commit is contained in:
@@ -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),
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user