mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-09-28 16:29:34 +08:00
Make flexible element to be shrinkable.
This make the application "just-fast" to look better.
This commit is contained in:
@@ -53,7 +53,7 @@ class HBox : public Node {
|
||||
|
||||
child_box.x_max = x + child->requirement().min.x - 1;
|
||||
|
||||
if (child->requirement().flex.x && remaining_extra_space > 0) {
|
||||
if (child->requirement().flex.x) {
|
||||
int added_space = remaining_extra_space * child->requirement().flex.x /
|
||||
remaining_flex;
|
||||
remaining_extra_space -= added_space;
|
||||
|
Reference in New Issue
Block a user