From 58ff448e768db8dffe2c79ab37e6afa66be72e0b Mon Sep 17 00:00:00 2001 From: Vemy <68952024+Chessom@users.noreply.github.com> Date: Sun, 1 Dec 2024 16:38:09 +0800 Subject: [PATCH] Fix: Properly changing window title text color #940 (#961) --- src/ftxui/dom/border.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ftxui/dom/border.cpp b/src/ftxui/dom/border.cpp index 596b707..b428ac4 100644 --- a/src/ftxui/dom/border.cpp +++ b/src/ftxui/dom/border.cpp @@ -65,7 +65,7 @@ class Border : public Node { if (children_.size() == 2) { Box title_box; title_box.x_min = box.x_min + 1; - title_box.x_max = box.x_max - 1; + title_box.x_max = std::min(box.x_max - 1, box.x_min + children_[1]->requirement().min_x); title_box.y_min = box.y_min; title_box.y_max = box.y_min; children_[1]->SetBox(title_box);