Re-implement hiding of the menubar in fullscreen with render to main.
This commit is contained in:
parent
46c1a0f03b
commit
fd2343e431
|
@ -1252,8 +1252,15 @@ void CFrame::DoFullscreen(bool enable_fullscreen)
|
||||||
// Hide toolbar
|
// Hide toolbar
|
||||||
DoToggleToolbar(false);
|
DoToggleToolbar(false);
|
||||||
|
|
||||||
// Disable toggling toolbar in menu
|
// Hide menubar (by having wxwidgets delete it)
|
||||||
GetMenuBar()->FindItem(IDM_TOGGLE_TOOLBAR)->Enable(false);
|
SetMenuBar(nullptr);
|
||||||
|
|
||||||
|
// Hide the statusbar if enabled
|
||||||
|
if (GetStatusBar()->IsShown())
|
||||||
|
{
|
||||||
|
GetStatusBar()->Hide();
|
||||||
|
this->SendSizeEvent();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1263,8 +1270,18 @@ void CFrame::DoFullscreen(bool enable_fullscreen)
|
||||||
// Restore toolbar to the status it was at before going fullscreen.
|
// Restore toolbar to the status it was at before going fullscreen.
|
||||||
DoToggleToolbar(SConfig::GetInstance().m_InterfaceToolbar);
|
DoToggleToolbar(SConfig::GetInstance().m_InterfaceToolbar);
|
||||||
|
|
||||||
// Re-enable toggling toolbar in menu
|
// Recreate the menubar if needed.
|
||||||
GetMenuBar()->FindItem(IDM_TOGGLE_TOOLBAR)->Enable(true);
|
if (GetMenuBar() == nullptr)
|
||||||
|
{
|
||||||
|
CreateMenu();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Show statusbar if enabled
|
||||||
|
if (SConfig::GetInstance().m_InterfaceStatusbar)
|
||||||
|
{
|
||||||
|
GetStatusBar()->Show();
|
||||||
|
this->SendSizeEvent();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue