Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #871 from shuffle2/hide-menubar
Re-implement hiding of the menubar in fullscreen with render to main.
  • Loading branch information
shuffle2 committed Sep 3, 2014
2 parents 7a18add + fd2343e commit 29ef22f
Showing 1 changed file with 21 additions and 4 deletions.
25 changes: 21 additions & 4 deletions Source/Core/DolphinWX/Frame.cpp
Expand Up @@ -1252,8 +1252,15 @@ void CFrame::DoFullscreen(bool enable_fullscreen)
// Hide toolbar
DoToggleToolbar(false);

// Disable toggling toolbar in menu
GetMenuBar()->FindItem(IDM_TOGGLE_TOOLBAR)->Enable(false);
// Hide menubar (by having wxwidgets delete it)
SetMenuBar(nullptr);

// Hide the statusbar if enabled
if (GetStatusBar()->IsShown())
{
GetStatusBar()->Hide();
this->SendSizeEvent();
}
}
else
{
Expand All @@ -1263,8 +1270,18 @@ void CFrame::DoFullscreen(bool enable_fullscreen)
// 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);
// Recreate the menubar if needed.
if (GetMenuBar() == nullptr)
{
CreateMenu();
}

// Show statusbar if enabled
if (SConfig::GetInstance().m_InterfaceStatusbar)
{
GetStatusBar()->Show();
this->SendSizeEvent();
}
}
}
else
Expand Down

0 comments on commit 29ef22f

Please sign in to comment.