mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-09-28 16:29:34 +08:00
Add flex_grow and flex_shrink.
Two new elements: - flex_grow : Expand the element to occupy free space. - flex_shrink: Minimize the element leave away missing space. flex = flex_grow | flex_shrink. Other changes: - hbox and vbox are now non flexible by default. - the vtext element has been added to help writting tests. - Many new tests.
This commit is contained in:

committed by
Arthur Sonzogni

parent
7f7775ba62
commit
08ee49f3e6
@@ -14,10 +14,12 @@ class Graph : public Node {
|
||||
~Graph() override {}
|
||||
|
||||
void ComputeRequirement() override {
|
||||
requirement_.flex_x = 1;
|
||||
requirement_.flex_y = 1;
|
||||
requirement_.min_x = 1;
|
||||
requirement_.min_y = 1;
|
||||
requirement_.flex_grow_x = 1;
|
||||
requirement_.flex_grow_y = 1;
|
||||
requirement_.flex_shrink_x = 1;
|
||||
requirement_.flex_shrink_y = 1;
|
||||
requirement_.min_x = 3;
|
||||
requirement_.min_y = 3;
|
||||
}
|
||||
|
||||
void Render(Screen& screen) override {
|
||||
|
Reference in New Issue
Block a user