mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-09-16 08:04:21 +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
@@ -118,7 +118,7 @@ class CompilerComponent : public Component {
|
||||
L"gcc",
|
||||
L"clang",
|
||||
L"emcc",
|
||||
L"game_maker"
|
||||
L"game_maker",
|
||||
L"Ada compilers",
|
||||
L"ALGOL 60 compilers",
|
||||
L"ALGOL 68 compilers",
|
||||
@@ -212,9 +212,9 @@ class CompilerComponent : public Component {
|
||||
}),
|
||||
filler(),
|
||||
}),
|
||||
hflow(RenderCommandLine()),
|
||||
hflow(RenderCommandLine()) | flex_grow,
|
||||
}) |
|
||||
border;
|
||||
flex_grow | border;
|
||||
}
|
||||
|
||||
Elements RenderCommandLine() {
|
||||
|
@@ -49,7 +49,7 @@ class MyComponent : public Component {
|
||||
});
|
||||
}
|
||||
|
||||
bool OnEvent(Event event) {
|
||||
bool OnEvent(Event event) override {
|
||||
if (event == Event::Return) {
|
||||
on_enter();
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user