Fixed toolbar hiding when going full-screen
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@49749 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -31,6 +31,10 @@
|
|||||||
#include "wx/app.h"
|
#include "wx/app.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if wxUSE_TOOLBAR
|
||||||
|
#include "wx/toolbar.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "wx/gtk/private.h"
|
#include "wx/gtk/private.h"
|
||||||
#include "wx/evtloop.h"
|
#include "wx/evtloop.h"
|
||||||
|
|
||||||
@@ -774,13 +778,33 @@ bool wxTopLevelWindowGTK::ShowFullScreen(bool show, long style )
|
|||||||
{
|
{
|
||||||
// Preserve menubar accelerators during full-screen operation
|
// Preserve menubar accelerators during full-screen operation
|
||||||
wxFrame* frame = wxDynamicCast(this, wxFrame);
|
wxFrame* frame = wxDynamicCast(this, wxFrame);
|
||||||
if (frame && frame->GetMenuBar())
|
if (frame)
|
||||||
|
{
|
||||||
|
if (frame->GetMenuBar())
|
||||||
{
|
{
|
||||||
wxAcceleratorTable table(wxCreateAcceleratorTableForMenuBar(frame->GetMenuBar()));
|
wxAcceleratorTable table(wxCreateAcceleratorTableForMenuBar(frame->GetMenuBar()));
|
||||||
if (table.IsOk())
|
if (table.IsOk())
|
||||||
SetAcceleratorTable(table);
|
SetAcceleratorTable(table);
|
||||||
}
|
}
|
||||||
|
#if wxUSE_TOOLBAR
|
||||||
|
if (frame->GetToolBar() && frame->GetToolBar()->IsShown())
|
||||||
|
{
|
||||||
|
frame->GetToolBar()->Show(false);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#if wxUSE_TOOLBAR
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// FIXME: we need to remember whether the toolbar was previously hidden
|
||||||
|
wxFrame* frame = wxDynamicCast(this, wxFrame);
|
||||||
|
if (frame && frame->GetToolBar())
|
||||||
|
{
|
||||||
|
frame->GetToolBar()->Show(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
m_fsIsShowing = show;
|
m_fsIsShowing = show;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user