Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #787 from archshift/fs-toolbar
Hides toolbar upon using fullscreen and rendering to main window.
  • Loading branch information
lioncash committed Aug 14, 2014
2 parents 3c2567c + 7af80c7 commit 16a7e6d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Source/Core/DolphinWX/Frame.cpp
Expand Up @@ -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
Expand Down

0 comments on commit 16a7e6d

Please sign in to comment.