Merge pull request #787 from archshift/fs-toolbar

Hides toolbar upon using fullscreen and rendering to main window.
This commit is contained in:
Lioncash 2014-08-14 17:13:06 -04:00
commit 16a7e6dce5

View File

@ -1242,11 +1242,23 @@ void CFrame::DoFullscreen(bool enable_fullscreen)
// Save the current mode before going to fullscreen
AuiCurrent = m_Mgr->SavePerspective();
m_Mgr->LoadPerspective(AuiFullscreen, true);
// Hide toolbar
DoToggleToolbar(false);
// Disable toggling toolbar in menu
GetMenuBar()->FindItem(IDM_TOGGLE_TOOLBAR)->Enable(false);
}
else
{
// Restore saved perspective
m_Mgr->LoadPerspective(AuiCurrent, true);
// Restore toolbar to the status it was at before going fullscreen.
DoToggleToolbar(SConfig::GetInstance().m_InterfaceToolbar);
// Re-enable toggling toolbar in menu
GetMenuBar()->FindItem(IDM_TOGGLE_TOOLBAR)->Enable(true);
}
}
else