mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-06-25 00:52:09 +08:00
Fix bug with "flex" element not settings their box.
This commit is contained in:
parent
a3cc6df32b
commit
25476f757b
@ -163,6 +163,7 @@ class VerticalContainer : public ContainerBase {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int old_selected = *selector_;
|
||||||
if (event.mouse().button == Mouse::WheelUp) {
|
if (event.mouse().button == Mouse::WheelUp) {
|
||||||
MoveSelector(-1);
|
MoveSelector(-1);
|
||||||
}
|
}
|
||||||
@ -171,7 +172,7 @@ class VerticalContainer : public ContainerBase {
|
|||||||
}
|
}
|
||||||
*selector_ = std::max(0, std::min(int(children_.size()) - 1, *selector_));
|
*selector_ = std::max(0, std::min(int(children_.size()) - 1, *selector_));
|
||||||
|
|
||||||
return true;
|
return old_selected != *selector_;
|
||||||
}
|
}
|
||||||
|
|
||||||
Box box_;
|
Box box_;
|
||||||
|
@ -80,6 +80,7 @@ class Flex : public Node {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void SetBox(Box box) override {
|
void SetBox(Box box) override {
|
||||||
|
Node::SetBox(box);
|
||||||
if (children_.empty()) {
|
if (children_.empty()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user