mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2024-11-23 03:10:01 +08:00
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:
parent
3f005d7715
commit
d197e2f4fb
@ -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:
|
||||||
|
@ -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());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user