mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-07-21 02:51:11 +08:00
fix container inside resizablesplit
This commit is contained in:
parent
e03a0797be
commit
66cff103bd
@ -23,10 +23,32 @@ class ResizableSplitBase : public ComponentBase {
|
|||||||
public:
|
public:
|
||||||
explicit ResizableSplitBase(ResizableSplitOption options)
|
explicit ResizableSplitBase(ResizableSplitOption options)
|
||||||
: options_(std::move(options)) {
|
: options_(std::move(options)) {
|
||||||
Add(Container::Horizontal({
|
switch (options_->direction()) {
|
||||||
options_->main,
|
case Direction::Left:
|
||||||
options_->back,
|
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 {
|
bool OnEvent(Event event) final {
|
||||||
|
Loading…
Reference in New Issue
Block a user