mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-07-19 18:01:12 +08:00
fix container inside resizablesplit
This commit is contained in:
parent
e03a0797be
commit
66cff103bd
@ -23,10 +23,32 @@ class ResizableSplitBase : public ComponentBase {
|
||||
public:
|
||||
explicit ResizableSplitBase(ResizableSplitOption options)
|
||||
: options_(std::move(options)) {
|
||||
Add(Container::Horizontal({
|
||||
options_->main,
|
||||
options_->back,
|
||||
}));
|
||||
switch (options_->direction()) {
|
||||
case Direction::Left:
|
||||
Add(Container::Horizontal({
|
||||
options_->main,
|
||||
options_->back,
|
||||
}));
|
||||
break;
|
||||
case Direction::Right:
|
||||
Add(Container::Horizontal({
|
||||
options_->back,
|
||||
options_->main,
|
||||
}));
|
||||
break;
|
||||
case Direction::Up:
|
||||
Add(Container::Vertical({
|
||||
options_->main,
|
||||
options_->back,
|
||||
}));
|
||||
break;
|
||||
case Direction::Down:
|
||||
Add(Container::Vertical({
|
||||
options_->back,
|
||||
options_->main,
|
||||
}));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
bool OnEvent(Event event) final {
|
||||
|
Loading…
Reference in New Issue
Block a user