Cosmetics
This commit is contained in:
+7
-1
@@ -67,7 +67,13 @@ class ExpansionPanel: public FormGroup {
|
||||
void open(bool state = true)
|
||||
{
|
||||
isOpen = state;
|
||||
coord_t newHeight = (state ? header->height() + body->height() : header->height());
|
||||
updateHeight();
|
||||
}
|
||||
|
||||
void updateHeight()
|
||||
{
|
||||
body->adjustInnerHeight();
|
||||
coord_t newHeight = (isOpen ? header->height() + body->height() : header->height());
|
||||
parent->moveWindowsTop(bottom(), newHeight - height());
|
||||
setHeight(newHeight);
|
||||
}
|
||||
|
||||
+3
-3
@@ -418,11 +418,11 @@ bool Window::onTouchSlide(coord_t x, coord_t y, coord_t startX, coord_t startY,
|
||||
|
||||
void Window::adjustInnerHeight()
|
||||
{
|
||||
innerHeight = 0;
|
||||
coord_t bottomMax = 0;
|
||||
for (auto child: children) {
|
||||
innerHeight = max(innerHeight, child->rect.y + child->rect.h);
|
||||
bottomMax = max(bottomMax, child->rect.y + child->rect.h);
|
||||
}
|
||||
invalidate();
|
||||
setInnerHeight(bottomMax);
|
||||
}
|
||||
|
||||
coord_t Window::adjustHeight()
|
||||
|
||||
Reference in New Issue
Block a user