Disable toolbar toggle in main window fullscreen

This commit is contained in:
archshift 2014-08-13 02:21:21 -07:00
parent b451f561ba
commit 7af80c7712
1 changed files with 8 additions and 0 deletions

View File

@ -1242,15 +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