mirror of
https://github.com/ClementTsang/bottom.git
synced 2025-04-08 17:05:59 +02:00
Renamed total rx/tx styles.
This commit is contained in:
parent
d917a27faa
commit
269d344c5b
@ -948,13 +948,13 @@ impl Painter {
|
||||
"Total RX: {:7}",
|
||||
app_state.canvas_data.total_rx_display
|
||||
))
|
||||
.style(self.colours.rx_total_style),
|
||||
.style(self.colours.total_rx_style),
|
||||
Dataset::default()
|
||||
.name(&format!(
|
||||
"Total TX: {:7}",
|
||||
app_state.canvas_data.total_tx_display
|
||||
))
|
||||
.style(self.colours.tx_total_style),
|
||||
.style(self.colours.total_tx_style),
|
||||
])
|
||||
.render(f, draw_loc);
|
||||
}
|
||||
@ -1752,8 +1752,8 @@ impl Painter {
|
||||
let network_text: Vec<Text<'_>> = vec![
|
||||
Text::Styled(rx_label.into(), self.colours.rx_style),
|
||||
Text::Styled(tx_label.into(), self.colours.tx_style),
|
||||
Text::Styled(total_rx_label.into(), self.colours.rx_total_style),
|
||||
Text::Styled(total_tx_label.into(), self.colours.tx_total_style),
|
||||
Text::Styled(total_rx_label.into(), self.colours.total_rx_style),
|
||||
Text::Styled(total_tx_label.into(), self.colours.total_tx_style),
|
||||
];
|
||||
|
||||
Paragraph::new(network_text.iter())
|
||||
|
@ -15,8 +15,8 @@ pub struct CanvasColours {
|
||||
pub swap_style: Style,
|
||||
pub rx_style: Style,
|
||||
pub tx_style: Style,
|
||||
pub rx_total_style: Style,
|
||||
pub tx_total_style: Style,
|
||||
pub total_rx_style: Style,
|
||||
pub total_tx_style: Style,
|
||||
pub avg_colour_style: Style,
|
||||
pub cpu_colour_styles: Vec<Style>,
|
||||
pub border_style: Style,
|
||||
@ -39,8 +39,8 @@ impl Default for CanvasColours {
|
||||
swap_style: Style::default().fg(STANDARD_SECOND_COLOUR),
|
||||
rx_style: Style::default().fg(STANDARD_FIRST_COLOUR),
|
||||
tx_style: Style::default().fg(STANDARD_SECOND_COLOUR),
|
||||
rx_total_style: Style::default().fg(STANDARD_THIRD_COLOUR),
|
||||
tx_total_style: Style::default().fg(STANDARD_FOURTH_COLOUR),
|
||||
total_rx_style: Style::default().fg(STANDARD_THIRD_COLOUR),
|
||||
total_tx_style: Style::default().fg(STANDARD_FOURTH_COLOUR),
|
||||
avg_colour_style: Style::default().fg(AVG_COLOUR),
|
||||
cpu_colour_styles: Vec::new(),
|
||||
border_style: Style::default().fg(text_colour),
|
||||
@ -94,12 +94,12 @@ impl CanvasColours {
|
||||
}
|
||||
|
||||
pub fn set_rx_total_colour(&mut self, colour: &str) -> error::Result<()> {
|
||||
self.rx_total_style = get_style_from_config(colour)?;
|
||||
self.total_rx_style = get_style_from_config(colour)?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn set_tx_total_colour(&mut self, colour: &str) -> error::Result<()> {
|
||||
self.tx_total_style = get_style_from_config(colour)?;
|
||||
self.total_tx_style = get_style_from_config(colour)?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user