Compare commits

...

3 Commits

Author SHA1 Message Date
Dmitry Nefedov
31d46a6e83
Merge ee584c5fdd into 58ff448e76 2024-12-01 17:03:17 +08:00
Vemy
58ff448e76
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
2024-12-01 09:38:09 +01:00
dangooddd
ee584c5fdd Add option to change cursor shape on exit of ScreenInteractive loop 2024-11-13 09:49:48 +03:00
3 changed files with 8 additions and 1 deletions

View File

@ -39,6 +39,8 @@ class ScreenInteractive : public Screen {
// Options. Must be called before Loop().
void TrackMouse(bool enable = true);
void SetCursorReset(Screen::Cursor::Shape shape);
// Return the currently active screen, nullptr if none.
static ScreenInteractive* Active();

View File

@ -441,6 +441,11 @@ void ScreenInteractive::TrackMouse(bool enable) {
track_mouse_ = enable;
}
/// @brief Set cursor shape on exit of main loop
void ScreenInteractive::SetCursorReset(Screen::Cursor::Shape shape) {
cursor_reset_shape_ = shape;
}
/// @brief Add a task to the main loop.
/// It will be executed later, after every other scheduled tasks.
/// @ingroup component

View File

@ -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);