ExpansionPanel fix
This commit is contained in:
@@ -19,6 +19,13 @@
|
|||||||
|
|
||||||
#include "expansion_panel.h"
|
#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):
|
ExpansionPanelHeader::ExpansionPanelHeader(ExpansionPanel * parent):
|
||||||
FormGroup(parent, {0, 0, parent->width(), parent->height()}, FORWARD_SCROLL)
|
FormGroup(parent, {0, 0, parent->width(), parent->height()}, FORWARD_SCROLL)
|
||||||
{
|
{
|
||||||
|
|||||||
+1
-9
@@ -70,15 +70,7 @@ class ExpansionPanel: public FormGroup {
|
|||||||
updateHeight();
|
updateHeight();
|
||||||
}
|
}
|
||||||
|
|
||||||
void 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 setFocus(uint8_t flag) override
|
void setFocus(uint8_t flag) override
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user