mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2024-11-26 20:47:05 +08:00
Fix layout bug detected thanks to dom_tests.
This commit is contained in:
parent
13d1cc1684
commit
20d4ee458a
@ -44,9 +44,6 @@ class HBox : public Node {
|
|||||||
|
|
||||||
int x = box.x_min;
|
int x = box.x_min;
|
||||||
for (auto& child : children) {
|
for (auto& child : children) {
|
||||||
if (x > box.x_max)
|
|
||||||
break;
|
|
||||||
|
|
||||||
Box child_box = box;
|
Box child_box = box;
|
||||||
child_box.x_min = x;
|
child_box.x_min = x;
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#include <iostream>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
#include "ftxui/dom/elements.hpp"
|
#include "ftxui/dom/elements.hpp"
|
||||||
@ -44,9 +45,6 @@ class VBox : public Node {
|
|||||||
|
|
||||||
int y = box.y_min;
|
int y = box.y_min;
|
||||||
for (auto& child : children) {
|
for (auto& child : children) {
|
||||||
if (y > box.y_max)
|
|
||||||
break;
|
|
||||||
|
|
||||||
Box child_box = box;
|
Box child_box = box;
|
||||||
child_box.y_min = y;
|
child_box.y_min = y;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user