tui: adjust the table column width (#1848)

This commit is contained in:
Gary Yu 2018-10-27 07:12:54 +08:00 committed by GitHub
parent 495c9ded58
commit 6a788e8a9a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View file

@ -185,9 +185,9 @@ impl TUIStatusListener for TUIMiningView {
}).column(StratumWorkerColumn::IsConnected, "Connected", |c| {
c.width_percent(10)
}).column(StratumWorkerColumn::LastSeen, "Last Seen", |c| {
c.width_percent(20)
c.width_percent(16)
}).column(StratumWorkerColumn::PowDifficulty, "Pow Difficulty", |c| {
c.width_percent(10)
c.width_percent(14)
}).column(StratumWorkerColumn::NumAccepted, "Num Accepted", |c| {
c.width_percent(10)
}).column(StratumWorkerColumn::NumRejected, "Num Rejected", |c| {

View file

@ -122,12 +122,12 @@ impl TUIStatusListener for TUIPeerView {
fn create() -> Box<View> {
let table_view = TableView::<PeerStats, PeerColumn>::new()
.column(PeerColumn::Address, "Address", |c| c.width_percent(16))
.column(PeerColumn::State, "State", |c| c.width_percent(16))
.column(PeerColumn::State, "State", |c| c.width_percent(8))
.column(PeerColumn::UsedBandwidth, "Used bandwidth", |c| {
c.width_percent(16)
}).column(PeerColumn::Direction, "Direction", |c| c.width_percent(16))
c.width_percent(24)
}).column(PeerColumn::Direction, "Direction", |c| c.width_percent(8))
.column(PeerColumn::TotalDifficulty, "Total Difficulty", |c| {
c.width_percent(16)
c.width_percent(24)
}).column(PeerColumn::Version, "Version", |c| c.width_percent(16));
let peer_status_view = BoxView::with_full_screen(
LinearLayout::new(Orientation::Vertical)