diff --git a/radio/src/thirdparty/libopenui/src/expansion_panel.cpp b/radio/src/thirdparty/libopenui/src/expansion_panel.cpp index 10b67f07c..624931dd5 100644 --- a/radio/src/thirdparty/libopenui/src/expansion_panel.cpp +++ b/radio/src/thirdparty/libopenui/src/expansion_panel.cpp @@ -19,10 +19,12 @@ #include "expansion_panel.h" -void ExpansionPanel::updateHeight() +void ExpansionPanel::updateHeight(bool move) { coord_t newHeight = (isOpen ? header->height() + body->height() : header->height()); - parent->moveWindowsTop(bottom(), newHeight - height()); + if (move) { + parent->moveWindowsTop(bottom(), newHeight - height()); + } setHeight(newHeight); } diff --git a/radio/src/thirdparty/libopenui/src/expansion_panel.h b/radio/src/thirdparty/libopenui/src/expansion_panel.h index 179b61bc2..dc196b4f9 100644 --- a/radio/src/thirdparty/libopenui/src/expansion_panel.h +++ b/radio/src/thirdparty/libopenui/src/expansion_panel.h @@ -64,7 +64,7 @@ class ExpansionPanel: public FormGroup open(!isOpen); } - void open(bool state = true) + virtual void open(bool state = true) { isOpen = state; updateHeight(); @@ -82,7 +82,7 @@ class ExpansionPanel: public FormGroup enable(false); } - void updateHeight(); + void updateHeight(bool move = true); void setFocus(uint8_t flag) override; diff --git a/radio/src/thirdparty/libopenui/src/window.cpp b/radio/src/thirdparty/libopenui/src/window.cpp index 0c76aa00e..a382f1e84 100644 --- a/radio/src/thirdparty/libopenui/src/window.cpp +++ b/radio/src/thirdparty/libopenui/src/window.cpp @@ -461,6 +461,10 @@ coord_t Window::adjustHeight() void Window::moveWindowsTop(coord_t y, coord_t delta) { + if (getWindowFlags() & FORWARD_SCROLL) { + parent->moveWindowsTop(bottom(), delta); + } + for (auto child: children) { if (child->rect.y >= y) { child->rect.y += delta;