window: do not center by default on updateSize()

This commit is contained in:
Raphael Coeffic
2022-06-11 15:13:11 +02:00
committed by Raphael Coeffic
parent d58fbe8c86
commit c1136c720e
4 changed files with 8 additions and 2 deletions
+6
View File
@@ -38,6 +38,12 @@ void DialogWindowContent::deleteLater(bool detach, bool trash)
ModalWindowContent::deleteLater(detach, trash);
}
void DialogWindowContent::updateSize()
{
lv_obj_center(lvobj);
ModalWindowContent::updateSize();
}
#if defined(DEBUG_WINDOWS)
std::string DialogWindowContent::getName() const override
{
+1
View File
@@ -32,6 +32,7 @@ class DialogWindowContent : public ModalWindowContent
DialogWindowContent(Dialog* parent, const rect_t& rect);
void deleteLater(bool detach = true, bool trash = true) override;
void updateSize() override;
#if defined(DEBUG_WINDOWS)
std::string getName() const override;
-1
View File
@@ -676,7 +676,6 @@ void Window::moveWindowsTop(coord_t y, coord_t delta)
void Window::updateSize()
{
lv_obj_set_height(lvobj, LV_SIZE_CONTENT);
lv_obj_center(lvobj);
lv_obj_update_layout(lvobj);
rect.x = lv_obj_get_x(lvobj);
+1 -1
View File
@@ -391,7 +391,7 @@ class Window
void moveWindowsTop(coord_t y, coord_t delta);
void updateSize();
virtual void updateSize();
void invalidate()
{