Fix vscroll hidding the last character. (#575)

This resolve:
https://github.com/ArthurSonzogni/FTXUI/issues/574
This commit is contained in:
Arthur Sonzogni
2023-02-12 13:51:51 +01:00
committed by GitHub
parent b2853c8f14
commit a4e70dfb93
3 changed files with 108 additions and 17 deletions

View File

@@ -27,10 +27,8 @@ Element vscroll_indicator(Element child) {
}
void SetBox(Box box) override {
NodeDecorator::SetBox(box);
if (box_.x_min > box_.x_max) {
box_.x_max--;
}
Node::SetBox(box);
box.x_max--;
children_[0]->SetBox(box);
}