mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-30 17:49:48 -06:00
GUI: Fixed Themes, closing tabs from the non-default panel and added back Tab_Split :P
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4072 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -369,7 +369,9 @@ CFrame::CFrame(bool showLogWindow,
|
||||
{
|
||||
wxBitmap aNormalFile = wxArtProvider::GetBitmap(wxART_NORMAL_FILE, wxART_OTHER, wxSize(16,16));
|
||||
|
||||
static int Style = wxAUI_NB_TOP | wxAUI_NB_TAB_MOVE | wxAUI_NB_SCROLL_BUTTONS | wxAUI_NB_CLOSE_ON_ACTIVE_TAB | wxAUI_NB_TAB_EXTERNAL_MOVE | wxNO_BORDER;
|
||||
static int Style =
|
||||
wxAUI_NB_TOP | wxAUI_NB_TAB_MOVE | wxAUI_NB_SCROLL_BUTTONS | wxAUI_NB_TAB_SPLIT |
|
||||
wxAUI_NB_CLOSE_ON_ACTIVE_TAB | wxAUI_NB_TAB_EXTERNAL_MOVE | wxNO_BORDER;
|
||||
m_NB1 = new wxAuiNotebook(this, wxID_ANY, wxDefaultPosition, wxSize(430,200), Style);
|
||||
m_NB0 = new wxAuiNotebook(this, wxID_ANY, wxDefaultPosition, wxSize(430,200), Style);
|
||||
m_NB0->AddPage(g_pCodeWindow, wxT("Code"), false, aNormalFile );
|
||||
@ -421,8 +423,7 @@ CFrame::CFrame(bool showLogWindow,
|
||||
|
||||
// Create toolbar
|
||||
RecreateToolbar();
|
||||
if (!SConfig::GetInstance().m_InterfaceToolbar)
|
||||
{ m_Mgr->GetPane(wxT("TBMain")).Hide(); if (UseDebugger) m_Mgr->GetPane(wxT("TBDebug")).Hide(); }
|
||||
|
||||
AuiMode1 = m_Mgr->SavePerspective();
|
||||
if (UseDebugger) g_pCodeWindow->UpdateToolbar(m_ToolBar2);
|
||||
|
||||
|
@ -285,13 +285,15 @@ void CFrame::PopulateToolbar(wxAuiToolBar* toolBar)
|
||||
// Delete and recreate the toolbar
|
||||
void CFrame::RecreateToolbar()
|
||||
{
|
||||
if (m_ToolBar) {
|
||||
m_Mgr->DetachPane(m_ToolBar);
|
||||
delete m_ToolBar; }
|
||||
|
||||
m_ToolBar = new wxAuiToolBar(this, ID_TOOLBAR, wxDefaultPosition, wxDefaultSize,
|
||||
wxAUI_TB_DEFAULT_STYLE | wxAUI_TB_OVERFLOW | wxAUI_TB_TEXT);
|
||||
|
||||
PopulateToolbar(m_ToolBar);
|
||||
|
||||
UpdateGUI();
|
||||
|
||||
m_Mgr->AddPane(m_ToolBar, wxAuiPaneInfo().
|
||||
Name(wxT("TBMain")).Caption(wxT("TBMain")).
|
||||
ToolbarPane().Top().
|
||||
@ -299,6 +301,10 @@ void CFrame::RecreateToolbar()
|
||||
|
||||
if (UseDebugger)
|
||||
{
|
||||
if (m_ToolBar2) {
|
||||
m_Mgr->DetachPane(m_ToolBar2);
|
||||
delete m_ToolBar2; }
|
||||
|
||||
m_ToolBar2 = new wxAuiToolBar(this, ID_TOOLBAR2, wxDefaultPosition, wxDefaultSize,
|
||||
wxAUI_TB_DEFAULT_STYLE | wxAUI_TB_OVERFLOW | wxAUI_TB_TEXT);
|
||||
|
||||
@ -310,19 +316,11 @@ void CFrame::RecreateToolbar()
|
||||
LeftDockable(false).RightDockable(false).Floatable(false));
|
||||
}
|
||||
|
||||
/*
|
||||
wxToolBarBase* toolBar = GetToolBar();
|
||||
long style = toolBar ? toolBar->GetWindowStyle() : TOOLBAR_STYLE;
|
||||
delete toolBar;
|
||||
SetToolBar(NULL);
|
||||
// Hide toolbars if disabled
|
||||
if (!SConfig::GetInstance().m_InterfaceToolbar)
|
||||
{ m_Mgr->GetPane(wxT("TBMain")).Hide(); if (UseDebugger) m_Mgr->GetPane(wxT("TBDebug")).Hide(); }
|
||||
|
||||
style &= ~(wxTB_HORIZONTAL | wxTB_VERTICAL | wxTB_BOTTOM | wxTB_RIGHT | wxTB_HORZ_LAYOUT | wxTB_TOP);
|
||||
m_ToolBar = CreateToolBar(style, ID_TOOLBAR);
|
||||
|
||||
PopulateToolbar(m_ToolBar);
|
||||
SetToolBar(m_ToolBar);
|
||||
UpdateGUI();
|
||||
*/
|
||||
}
|
||||
|
||||
void CFrame::InitBitmaps()
|
||||
@ -422,7 +420,7 @@ void CFrame::InitBitmaps()
|
||||
}
|
||||
|
||||
// Update in case the bitmap has been updated
|
||||
if (GetToolBar() != NULL)
|
||||
if (m_ToolBar != NULL)
|
||||
RecreateToolbar();
|
||||
}
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
Reference in New Issue
Block a user