menu: fix position / size

This commit is contained in:
Raphael Coeffic
2022-06-11 15:13:11 +02:00
committed by Raphael Coeffic
parent bd7e893a0b
commit 07e4f494b1
2 changed files with 9 additions and 7 deletions
+8
View File
@@ -253,6 +253,14 @@ Menu::Menu(Window * parent, bool multiple):
{
}
void Menu::setToolbar(Window * window)
{
toolbar = window;
toolbar->setLeft(content->left() - toolbar->width());
toolbar->setTop(content->top());
toolbar->setHeight(content->height());
}
void Menu::updatePosition()
{
coord_t height = content->body.getContentHeight();
+1 -7
View File
@@ -186,13 +186,7 @@ class Menu: public ModalWindow
content->body.setFocus(flag);
}
void setToolbar(Window * window)
{
toolbar = window;
content->setLeft(toolbar->right());
content->setTop(toolbar->top());
content->setHeight(toolbar->height());
}
void setToolbar(Window * window);
void setTitle(std::string text);