From 00bb7f46808bf2402b21919f3a1ac2e808978073 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20Monta=C3=B1ana=20G=C3=B3mez?= Date: Thu, 14 Mar 2024 23:52:33 +0100 Subject: [PATCH] Adjust sizes in b_manage --- src/main/Result.cpp | 6 +++--- src/manage/CommandParser.cpp | 2 +- src/manage/ManageResults.cpp | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/Result.cpp b/src/main/Result.cpp index b070641..ae72f1a 100644 --- a/src/main/Result.cpp +++ b/src/main/Result.cpp @@ -87,11 +87,11 @@ namespace platform { std::string durationUnit = duration > 3600 ? "h" : duration > 60 ? "m" : "s"; oss << data["date"].get() << " "; oss << std::setw(maxModel) << std::left << data["model"].get() << " "; - oss << std::setw(11) << std::left << data["score_name"].get() << " "; - oss << std::right << std::setw(11) << std::setprecision(7) << std::fixed << score << " "; + oss << std::setw(10) << std::left << data["score_name"].get() << " "; + oss << std::right << std::setw(9) << std::setprecision(7) << std::fixed << score << " "; auto completeString = isComplete() ? "C" : "P"; oss << std::setw(1) << " " << completeString << " "; - oss << std::setw(7) << std::setprecision(2) << std::fixed << durationShow << " " << durationUnit << " "; + oss << std::setw(5) << std::setprecision(2) << std::fixed << durationShow << " " << durationUnit << " "; oss << std::setw(50) << std::left << data["title"].get() << " "; return oss.str(); } diff --git a/src/manage/CommandParser.cpp b/src/manage/CommandParser.cpp index 5c8c96d..9e83644 100644 --- a/src/manage/CommandParser.cpp +++ b/src/manage/CommandParser.cpp @@ -16,7 +16,7 @@ namespace platform { while (!finished) { std::stringstream oss; std::string line; - oss << color << "Choose option ("; + oss << color << "Options ("; bool first = true; for (auto& option : options) { if (first) { diff --git a/src/manage/ManageResults.cpp b/src/manage/ManageResults.cpp index 9f031e5..7fdd31c 100644 --- a/src/manage/ManageResults.cpp +++ b/src/manage/ManageResults.cpp @@ -57,8 +57,8 @@ namespace platform { auto i = 0; int maxModel = results.maxModelSize(); int maxTitle = results.maxTitleSize(); - std::cout << Colors::GREEN() << " # Date " << std::setw(maxModel) << std::left << "Model" << " Score Name Score C/P Duration Title" << std::endl; - std::cout << "=== ========== " << std::string(maxModel, '=') << " =========== =========== === ========= " << std::string(maxTitle, '=') << std::endl; + std::cout << Colors::GREEN() << " # Date " << std::setw(maxModel) << std::left << "Model" << " Score Name Score C/P Time Title" << std::endl; + std::cout << "=== ========== " << std::string(maxModel, '=') << " ========== ========= === ======= " << std::string(maxTitle, '=') << std::endl; for (int i = index_from; i <= index_to; i++) { auto color = (i % 2) ? Colors::BLUE() : Colors::CYAN(); std::cout << color << std::setw(3) << std::fixed << std::right << i << " ";