better styling
This commit is contained in:
parent
829c300b56
commit
f9b77a02fe
1 changed files with 7 additions and 9 deletions
|
@ -166,7 +166,7 @@ fn uploads(
|
||||||
let files = files.join(", ");
|
let files = files.join(", ");
|
||||||
let files = Line::from(files).centered();
|
let files = Line::from(files).centered();
|
||||||
let size = Line::from(format!("{size}")).centered();
|
let size = Line::from(format!("{size}")).centered();
|
||||||
rows.push(Row::new([src, size, files]));
|
rows.push(Row::new([src, size, files]).yellow());
|
||||||
}
|
}
|
||||||
|
|
||||||
if state.selected().is_none() && !rows.is_empty() {
|
if state.selected().is_none() && !rows.is_empty() {
|
||||||
|
@ -231,30 +231,28 @@ impl Widget for NetworkInfoWidget {
|
||||||
{
|
{
|
||||||
let udp = "UDP socket";
|
let udp = "UDP socket";
|
||||||
let udp = udp.to_line().left_aligned();
|
let udp = udp.to_line().left_aligned();
|
||||||
let uaddr = format!("{:?}", joecalsend::LISTENING_SOCKET_ADDR).yellow();
|
let uaddr = format!("{:?}", joecalsend::LISTENING_SOCKET_ADDR);
|
||||||
let udp = Row::new(vec![udp, uaddr.to_line().right_aligned()])
|
let udp = Row::new(vec![udp, uaddr.to_line().right_aligned()]).yellow();
|
||||||
.style(Style::new().fg(Color::LightYellow));
|
|
||||||
|
|
||||||
let mip = format!(
|
let mip = format!(
|
||||||
"{:?}:{:?}",
|
"{:?}:{:?}",
|
||||||
joecalsend::MULTICAST_IP,
|
joecalsend::MULTICAST_IP,
|
||||||
joecalsend::DEFAULT_PORT
|
joecalsend::DEFAULT_PORT
|
||||||
)
|
);
|
||||||
.yellow();
|
|
||||||
let multicast = "Multicast address";
|
let multicast = "Multicast address";
|
||||||
let multicast = Row::new(vec![
|
let multicast = Row::new(vec![
|
||||||
multicast.to_line().left_aligned(),
|
multicast.to_line().left_aligned(),
|
||||||
mip.to_line().right_aligned(),
|
mip.to_line().right_aligned(),
|
||||||
])
|
])
|
||||||
.style(Style::new().fg(Color::LightYellow));
|
.yellow();
|
||||||
|
|
||||||
let haddr = format!("{:?}", joecalsend::LISTENING_SOCKET_ADDR).yellow();
|
let haddr = format!("{:?}", joecalsend::LISTENING_SOCKET_ADDR);
|
||||||
let http = "HTTP address";
|
let http = "HTTP address";
|
||||||
let http = Row::new(vec![
|
let http = Row::new(vec![
|
||||||
http.to_line().left_aligned(),
|
http.to_line().left_aligned(),
|
||||||
haddr.to_line().right_aligned(),
|
haddr.to_line().right_aligned(),
|
||||||
])
|
])
|
||||||
.style(Style::new().fg(Color::LightYellow));
|
.yellow();
|
||||||
|
|
||||||
let rows = vec![udp, multicast, http];
|
let rows = vec![udp, multicast, http];
|
||||||
let widths = vec![Constraint::Percentage(50), Constraint::Percentage(50)];
|
let widths = vec![Constraint::Percentage(50), Constraint::Percentage(50)];
|
||||||
|
|
Loading…
Reference in a new issue