diff options
| author | shuffle2 <godisgovernment@gmail.com> | 2014-09-03 15:21:33 -0700 |
|---|---|---|
| committer | shuffle2 <godisgovernment@gmail.com> | 2014-09-03 15:21:33 -0700 |
| commit | 29ef22fd81f43e3ddffa05f2fc5c07f8d98f3d2a (patch) | |
| tree | fec24c610a70cdff6454d7b04b5faa74084bc9c0 /Source/Core | |
| parent | 7a18add39fac71353fae2b5b05d7de354dd723b6 (diff) | |
| parent | fd2343e431d5bdb470677ca4f1a61da3bc8a7a15 (diff) | |
Merge pull request #871 from shuffle2/hide-menubar
Re-implement hiding of the menubar in fullscreen with render to main.
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/DolphinWX/Frame.cpp | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/Source/Core/DolphinWX/Frame.cpp b/Source/Core/DolphinWX/Frame.cpp index 190c0947cd..7885986fb2 100644 --- a/Source/Core/DolphinWX/Frame.cpp +++ b/Source/Core/DolphinWX/Frame.cpp @@ -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 { @@ -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 |
