From 7573a98bb4a2a7a6d9be68dc8a91f1c88a344b9d Mon Sep 17 00:00:00 2001 From: Yat Ho Date: Sat, 30 Dec 2023 04:55:06 +0800 Subject: [PATCH] ui: unify percent done format in `transmission-remote` (#6447) * ui: unify percent done display format in `remote` * fix: adjust field width for the new format --- utils/remote.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/utils/remote.cc b/utils/remote.cc index e1b9379b6..d5ce1b160 100644 --- a/utils/remote.cc +++ b/utils/remote.cc @@ -1445,8 +1445,8 @@ static void printTorrentList(tr_variant* top) double total_up = 0; double total_down = 0; - printf( - "%6s %-4s %9s %-9s %6s %6s %-5s %-11s %s\n", + fmt::print( + "{:>6s} {:>5s} {:>9s} {:<9s} {:>6s} {:>6s} {:<5s} {:<11s} {:4s} {:>9s} {:<9s} {:6.1f} {:6.1f} {:>5s} {:<11s} {:s}\n"), + FMT_STRING("{:>6d}{:c} {:>5s} {:>9s} {:<9s} {:6.1f} {:6.1f} {:>5s} {:<11s} {:9s} {:6.1f} {:6.1f}\n"), + FMT_STRING("Sum: {:>9s} {:6.1f} {:6.1f}\n"), strlsize(total_size).c_str(), Speed{ total_up, Speed::Units::Byps }.count(Speed::Units::KByps), Speed{ total_down, Speed::Units::Byps }.count(Speed::Units::KByps));