tidying
This commit is contained in:
parent
749efef29d
commit
49948e3b80
@ -46,10 +46,15 @@ void tableprint::print() {
|
|||||||
std::wcout << std::wstring(padding, L' ') << std::wstring(title.begin(), title.end())
|
std::wcout << std::wstring(padding, L' ') << std::wstring(title.begin(), title.end())
|
||||||
<< std::wstring(total_width - title.length() - padding, L' ');
|
<< std::wstring(total_width - title.length() - padding, L' ');
|
||||||
std::wcout << L"\033[90m│" << std::endl;
|
std::wcout << L"\033[90m│" << std::endl;
|
||||||
std::wcout << L"└" << std::wstring(total_width, L'─') << L"┘" << std::endl;
|
// Use └─┴─┘ for bottom of title box to connect with table
|
||||||
|
std::wcout << L"├";
|
||||||
|
for (size_t i = 0; i < rows[0].size(); ++i) {
|
||||||
|
std::wcout << std::wstring(col_widths[i] + 2, L'─');
|
||||||
|
if (i < rows[0].size() - 1) std::wcout << L"┬";
|
||||||
}
|
}
|
||||||
|
std::wcout << L"┤" << std::endl;
|
||||||
// Print top border
|
} else {
|
||||||
|
// Print top border if no title
|
||||||
std::wcout << L"\033[90m"; // Dark grey color for borders
|
std::wcout << L"\033[90m"; // Dark grey color for borders
|
||||||
std::wcout << L"┌";
|
std::wcout << L"┌";
|
||||||
for (size_t i = 0; i < rows[0].size(); ++i) {
|
for (size_t i = 0; i < rows[0].size(); ++i) {
|
||||||
@ -57,6 +62,7 @@ void tableprint::print() {
|
|||||||
if (i < rows[0].size() - 1) std::wcout << L"┬";
|
if (i < rows[0].size() - 1) std::wcout << L"┬";
|
||||||
}
|
}
|
||||||
std::wcout << L"┐" << std::endl;
|
std::wcout << L"┐" << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
// Print header
|
// Print header
|
||||||
std::wcout << L"│";
|
std::wcout << L"│";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user