Skip to content
Snippets Groups Projects
Commit 9c7c7a5e authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

fix saved height of graphic win with menu bar

parent b8b7d8c0
No related branches found
No related tags found
No related merge requests found
......@@ -796,8 +796,8 @@ void FlGui::storeCurrentWindowsInfo()
{
CTX::instance()->glPosition[0] = graph[0]->win->x();
CTX::instance()->glPosition[1] = graph[0]->win->y();
CTX::instance()->glSize[0] = graph[0]->win->w();
CTX::instance()->glSize[1] = (graph[0]->win->h() - graph[0]->bottom->h());
CTX::instance()->glSize[0] = graph[0]->getGlWidth();
CTX::instance()->glSize[1] = graph[0]->getGlHeight();
CTX::instance()->msgSize = graph[0]->getMessageHeight();
CTX::instance()->menuSize = graph[0]->getMenuWidth();
CTX::instance()->optPosition[0] = options->win->x();
......
......@@ -3026,6 +3026,18 @@ void graphicWindow::resizeMenu(int dh)
onelab->redraw();
}
int graphicWindow::getGlHeight()
{
int h = win->h() - bottom->h(); // yes, ignore message browser
if(bar) h -= bar->h();
return h;
}
int graphicWindow::getGlWidth()
{
return win->w();
}
void graphicWindow::showMenu()
{
if(!onelab || !win->shown()) return;
......
......@@ -46,6 +46,8 @@ class graphicWindow{
void setTitle(std::string str);
void setAutoScroll(bool val){ _autoScrollMessages = val; }
bool getAutoScroll(){ return _autoScrollMessages; }
int getGlHeight();
int getGlWidth();
int getMessageHeight();
void split(openglWindow *g, char how);
void setAnimButtons(int mode);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment