make table full width

This commit is contained in:
Clément DOUIN 2024-08-19 09:55:08 +02:00
parent 444efc6beb
commit daf2c7c87a
No known key found for this signature in database
GPG key ID: 353E4A18EE0FAB72
3 changed files with 4 additions and 3 deletions

View file

@ -57,7 +57,7 @@ impl Accounts {
table table
.load_preset(presets::NOTHING) .load_preset(presets::NOTHING)
.set_content_arrangement(ContentArrangement::Dynamic) .set_content_arrangement(ContentArrangement::DynamicFullWidth)
.set_header(Row::from([ .set_header(Row::from([
Cell::new("NAME").add_attribute(Attribute::Reverse), Cell::new("NAME").add_attribute(Attribute::Reverse),
Cell::new("BACKENDS").add_attribute(Attribute::Reverse), Cell::new("BACKENDS").add_attribute(Attribute::Reverse),

View file

@ -199,7 +199,7 @@ impl Envelopes {
table table
.load_preset(presets::NOTHING) .load_preset(presets::NOTHING)
.set_content_arrangement(ContentArrangement::Dynamic) .set_content_arrangement(ContentArrangement::DynamicFullWidth)
.set_header(Row::from([ .set_header(Row::from([
Cell::new("ID").add_attribute(Attribute::Reverse), Cell::new("ID").add_attribute(Attribute::Reverse),
Cell::new("FLAGS").add_attribute(Attribute::Reverse), Cell::new("FLAGS").add_attribute(Attribute::Reverse),

View file

@ -2,7 +2,7 @@ pub mod arg;
pub mod command; pub mod command;
pub mod config; pub mod config;
use comfy_table::{presets, Attribute, Cell, Row, Table}; use comfy_table::{presets, Attribute, Cell, ContentArrangement, Row, Table};
use serde::{Serialize, Serializer}; use serde::{Serialize, Serializer};
use std::{fmt, ops::Deref}; use std::{fmt, ops::Deref};
@ -41,6 +41,7 @@ impl Folders {
table table
.load_preset(presets::NOTHING) .load_preset(presets::NOTHING)
.set_content_arrangement(ContentArrangement::DynamicFullWidth)
.set_header(Row::from([ .set_header(Row::from([
Cell::new("NAME").add_attribute(Attribute::Reverse), Cell::new("NAME").add_attribute(Attribute::Reverse),
Cell::new("DESC").add_attribute(Attribute::Reverse), Cell::new("DESC").add_attribute(Attribute::Reverse),