Switch to rounded borders. (#175)

They are nicer.
It would be nice supporting a way for FTXUI to let the user chose what
they prefer instead.
This commit is contained in:
Arthur Sonzogni 2021-08-07 22:30:55 +02:00 committed by GitHub
parent 3f005d7715
commit d197e2f4fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 7 deletions

View File

@ -12,7 +12,12 @@
namespace ftxui { namespace ftxui {
static wchar_t simple_border_charset[] = L"┌┐└┘─│┬┴┤├"; static wchar_t simple_border_charset[] = L"╭╮╰╯─│┬┴┤├";
// For reference, here is the charset for normal border:
// L"┌┐└┘─│┬┴┤├";
// TODO(arthursonzogni): Consider adding options to choose the kind of borders
// to use.
class Border : public Node { class Border : public Node {
public: public:

View File

@ -57,9 +57,9 @@ TEST(TextTest, CJK) {
Screen screen(6, 3); Screen screen(6, 3);
Render(screen, element); Render(screen, element);
EXPECT_EQ( EXPECT_EQ(
"┌────┐\r\n" "╭────╮\r\n"
"│测试│\r\n" "│测试│\r\n"
"└────┘", "╰────╯",
screen.ToString()); screen.ToString());
} }
@ -69,9 +69,9 @@ TEST(TextTest, CJK_2) {
Screen screen(5, 3); Screen screen(5, 3);
Render(screen, element); Render(screen, element);
EXPECT_EQ( EXPECT_EQ(
"┌───┐\r\n" "╭───╮\r\n"
"│测试\r\n" "│测试\r\n"
"└───┘", "╰───╯",
screen.ToString()); screen.ToString());
} }
@ -81,9 +81,9 @@ TEST(TextTest, CJK_3) {
Screen screen(4, 3); Screen screen(4, 3);
Render(screen, element); Render(screen, element);
EXPECT_EQ( EXPECT_EQ(
"┌──┐\r\n" "╭──╮\r\n"
"│测│\r\n" "│测│\r\n"
"└──┘", "╰──╯",
screen.ToString()); screen.ToString());
} }