diff --git a/radio/src/thirdparty/libopenui/src/expansion_panel.cpp b/radio/src/thirdparty/libopenui/src/expansion_panel.cpp index 6f2a84689..a73e098c9 100644 --- a/radio/src/thirdparty/libopenui/src/expansion_panel.cpp +++ b/radio/src/thirdparty/libopenui/src/expansion_panel.cpp @@ -19,6 +19,13 @@ #include "expansion_panel.h" +void ExpansionPanel::updateHeight() +{ + coord_t newHeight = (isOpen ? header->height() + body->height() : header->height()); + parent->moveWindowsTop(bottom(), newHeight - height()); + setHeight(newHeight); +} + ExpansionPanelHeader::ExpansionPanelHeader(ExpansionPanel * parent): FormGroup(parent, {0, 0, parent->width(), parent->height()}, FORWARD_SCROLL) { diff --git a/radio/src/thirdparty/libopenui/src/expansion_panel.h b/radio/src/thirdparty/libopenui/src/expansion_panel.h index 26ce33af4..67286faee 100644 --- a/radio/src/thirdparty/libopenui/src/expansion_panel.h +++ b/radio/src/thirdparty/libopenui/src/expansion_panel.h @@ -70,15 +70,7 @@ class ExpansionPanel: public FormGroup { updateHeight(); } - void updateHeight() - { - coord_t previousHeight = height(); - coord_t previousBottom = bottom(); - body->adjustInnerHeight(); - coord_t newHeight = (isOpen ? header->height() + body->height() : header->height()); - parent->moveWindowsTop(previousBottom, newHeight - previousHeight); - setHeight(newHeight); - } + void updateHeight(); void setFocus(uint8_t flag) override {