1
0
mirror of https://github.com/danog/ytop.git synced 2024-11-30 04:29:10 +01:00

Fix some net layout issues

This commit is contained in:
Caleb Bassi 2020-01-13 11:03:43 -08:00
parent 851b61e0a9
commit af93823ff2

View File

@ -91,7 +91,7 @@ impl Widget for NetWidget<'_, '_> {
x: inner.x, x: inner.x,
y: inner.y + 3, y: inner.y + 3,
width: inner.width, width: inner.width,
height: (inner.height / 2) - 3, height: i16::max((inner.height as i16 / 2) - 3, 0) as u16,
}; };
let bottom_half = Rect { let bottom_half = Rect {
@ -103,9 +103,9 @@ impl Widget for NetWidget<'_, '_> {
let bottom_sparkline = Rect { let bottom_sparkline = Rect {
x: inner.x, x: inner.x,
y: inner.y + (inner.height / 2) + 4, y: inner.y + (inner.height / 2) + 3,
width: inner.width, width: inner.width,
height: (inner.height / 2) - 3, height: i16::max((inner.height as i16 / 2) - 3, 0) as u16,
}; };
buf.set_string( buf.set_string(