Make flexible element to be shrinkable.

This make the application "just-fast" to look better.
This commit is contained in:
ArthurSonzogni
2020-05-02 17:39:42 +02:00
parent cccbe5baa9
commit 1974e9f9fc
4 changed files with 5 additions and 5 deletions

View File

@@ -54,7 +54,7 @@ class VBox : public Node {
child_box.y_max = y + child->requirement().min.y - 1;
if (child->requirement().flex.y && remaining_extra_space > 0) {
if (child->requirement().flex.y) {
int added_space = remaining_extra_space * child->requirement().flex.y /
remaining_flex;
remaining_extra_space -= added_space;