window: fixed adjustHeight() & moveWindowsTop()
This commit is contained in:
committed by
Raphael Coeffic
parent
904eb62029
commit
94c6d25f18
+7
-3
@@ -621,8 +621,12 @@ void Window::adjustInnerHeight()
|
|||||||
coord_t Window::adjustHeight()
|
coord_t Window::adjustHeight()
|
||||||
{
|
{
|
||||||
coord_t old = rect.h;
|
coord_t old = rect.h;
|
||||||
adjustInnerHeight();
|
if (lvobj) {
|
||||||
if (lvobj) lv_obj_set_style_height(lvobj, rect.h, LV_PART_MAIN);
|
lv_obj_set_height(lvobj, LV_SIZE_CONTENT);
|
||||||
|
lv_obj_update_layout(lvobj);
|
||||||
|
rect.h = lv_obj_get_height(lvobj);
|
||||||
|
lv_obj_set_style_height(lvobj, rect.h, LV_PART_MAIN);
|
||||||
|
}
|
||||||
return rect.h - old;
|
return rect.h - old;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -634,7 +638,7 @@ void Window::moveWindowsTop(coord_t y, coord_t delta)
|
|||||||
|
|
||||||
for (auto child: children) {
|
for (auto child: children) {
|
||||||
if (child->rect.y >= y) {
|
if (child->rect.y >= y) {
|
||||||
child->rect.y += delta;
|
child->setTop(child->top() + delta);
|
||||||
invalidate();
|
invalidate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user