Fix: Properly changing window title text color #940 (#961)
Some checks failed
Build / Tests (llvm, llvm-cov gcov, Linux Clang, ubuntu-latest) (push) Failing after 32s
Build / Tests (gcc, gcov, Linux GCC, ubuntu-latest) (push) Failing after 35s
Build / documentation (push) Failing after 33s
CodeQL / Analyze (cpp) (push) Failing after 49s
Build / Tests (cl, Windows MSVC, windows-latest) (push) Has been cancelled
Build / Create release (push) Has been cancelled
Build / Build packages (build/ftxui*Darwin*, macos-latest) (push) Has been cancelled
Build / Build packages (build/ftxui*Linux*, ubuntu-latest) (push) Has been cancelled
Build / Build packages (build/ftxui*Win64*, windows-latest) (push) Has been cancelled

This commit is contained in:
Vemy 2024-12-01 16:38:09 +08:00 committed by GitHub
parent dfa461b46b
commit 58ff448e76
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -65,7 +65,7 @@ class Border : public Node {
if (children_.size() == 2) { if (children_.size() == 2) {
Box title_box; Box title_box;
title_box.x_min = box.x_min + 1; 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_min = box.y_min;
title_box.y_max = box.y_min; title_box.y_max = box.y_min;
children_[1]->SetBox(title_box); children_[1]->SetBox(title_box);