Fixed network chart bug, changed search widget option positioning to always place at bottom.

This commit is contained in:
ClementTsang 2020-02-15 17:19:49 -05:00
parent a18537040d
commit 470e431e55
2 changed files with 8 additions and 3 deletions

View file

@ -1157,8 +1157,12 @@ impl Painter {
}];
// Text options shamelessly stolen from VS Code.
let option_text = vec![
Text::styled("\n\n", self.colours.table_header_style),
let mut option_text = vec![];
for _ in 0..(draw_loc.height - 3) {
option_text.push(Text::raw("\n"));
}
let option_row = vec![
Text::styled("Match Case (Alt+C)", self.colours.table_header_style),
if !app_state.search_state.is_ignoring_case() {
Text::styled("[*]", self.colours.table_header_style)
@ -1180,6 +1184,7 @@ impl Painter {
Text::styled("[ ]", self.colours.table_header_style)
},
];
option_text.extend(option_row);
search_text.extend(query_with_cursor);
search_text.extend(option_text);

View file

@ -268,7 +268,7 @@ pub fn convert_network_data_points(
}
rx.push((time_from_start, data.rx_data.0));
tx.push((time_from_start, data.rx_data.0));
tx.push((time_from_start, data.tx_data.0));
}
let total_rx_converted_result: (f64, String);