ExpansionPanel fix

This commit is contained in:
Bertrand Songis
2020-05-26 16:10:24 +02:00
parent 211bb1dc4a
commit 41cace6e2e
2 changed files with 8 additions and 9 deletions
@@ -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)
{
+1 -9
View File
@@ -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
{