Use GetClientRect in the GameListCtrl OnSize function, but removed the +5 padding. This seems to look best on windows and linux. Unfortunately wxWidgets on linux doesn't account for visibility of the vertical scrollbar in this or any calculation I have found.
Also fixed an issue with the saving of the log/console window size. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6013 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
c88689381f
commit
840bd3613f
|
@ -597,7 +597,7 @@ void CFrame::OnDropDownToolbarSelect(wxCommandEvent& event)
|
||||||
Tmp.Name = dlg.GetValue().mb_str();
|
Tmp.Name = dlg.GetValue().mb_str();
|
||||||
Tmp.Perspective = m_Mgr->SavePerspective();
|
Tmp.Perspective = m_Mgr->SavePerspective();
|
||||||
|
|
||||||
ActivePerspective = Perspectives.size();
|
ActivePerspective = (u32)Perspectives.size();
|
||||||
Perspectives.push_back(Tmp);
|
Perspectives.push_back(Tmp);
|
||||||
|
|
||||||
UpdateCurrentPerspective();
|
UpdateCurrentPerspective();
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -46,6 +46,7 @@ BEGIN_EVENT_TABLE(CLogWindow, wxPanel)
|
||||||
EVT_CHECKBOX(IDM_WRITEWINDOW, CLogWindow::OnOptionsCheck)
|
EVT_CHECKBOX(IDM_WRITEWINDOW, CLogWindow::OnOptionsCheck)
|
||||||
EVT_CHECKLISTBOX(IDM_LOGCHECKS, CLogWindow::OnLogCheck)
|
EVT_CHECKLISTBOX(IDM_LOGCHECKS, CLogWindow::OnLogCheck)
|
||||||
EVT_TIMER(IDTM_UPDATELOG, CLogWindow::OnLogTimer)
|
EVT_TIMER(IDTM_UPDATELOG, CLogWindow::OnLogTimer)
|
||||||
|
EVT_SIZE(CLogWindow::OnSize)
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
CLogWindow::CLogWindow(CFrame *parent, wxWindowID id, const wxPoint& pos,
|
CLogWindow::CLogWindow(CFrame *parent, wxWindowID id, const wxPoint& pos,
|
||||||
|
@ -170,14 +171,28 @@ void CLogWindow::OnClose(wxCloseEvent& event)
|
||||||
event.Skip();
|
event.Skip();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CLogWindow::OnSize(wxSizeEvent& event)
|
||||||
|
{
|
||||||
|
if (!Parent->g_pCodeWindow &&
|
||||||
|
Parent->m_Mgr->GetPane(wxT("Pane 1")).IsShown())
|
||||||
|
{
|
||||||
|
x = Parent->m_Mgr->GetPane(wxT("Pane 1")).rect.GetWidth();
|
||||||
|
y = Parent->m_Mgr->GetPane(wxT("Pane 1")).rect.GetHeight();
|
||||||
|
winpos = Parent->m_Mgr->GetPane(wxT("Pane 1")).dock_direction;
|
||||||
|
}
|
||||||
|
event.Skip();
|
||||||
|
}
|
||||||
|
|
||||||
void CLogWindow::SaveSettings()
|
void CLogWindow::SaveSettings()
|
||||||
{
|
{
|
||||||
IniFile ini;
|
IniFile ini;
|
||||||
|
ini.Load(File::GetUserPath(F_LOGGERCONFIG_IDX));
|
||||||
|
|
||||||
if (!Parent->g_pCodeWindow)
|
if (!Parent->g_pCodeWindow)
|
||||||
{
|
{
|
||||||
ini.Set("LogWindow", "x", Parent->m_Mgr->GetPane(wxT("Pane 1")).rect.GetWidth());
|
ini.Set("LogWindow", "x", x);
|
||||||
ini.Set("LogWindow", "y", Parent->m_Mgr->GetPane(wxT("Pane 1")).rect.GetHeight());
|
ini.Set("LogWindow", "y", y);
|
||||||
ini.Set("LogWindow", "pos", Parent->m_Mgr->GetPane(wxT("Pane 1")).dock_direction);
|
ini.Set("LogWindow", "pos", winpos);
|
||||||
}
|
}
|
||||||
ini.Set("Options", "Verbosity", m_verbosity->GetSelection() + 1);
|
ini.Set("Options", "Verbosity", m_verbosity->GetSelection() + 1);
|
||||||
ini.Set("Options", "Font", m_FontChoice->GetSelection());
|
ini.Set("Options", "Font", m_FontChoice->GetSelection());
|
||||||
|
|
|
@ -97,6 +97,7 @@ private:
|
||||||
void CreateGUIControls();
|
void CreateGUIControls();
|
||||||
void PopulateRight(); void UnPopulateRight();
|
void PopulateRight(); void UnPopulateRight();
|
||||||
void OnClose(wxCloseEvent& event);
|
void OnClose(wxCloseEvent& event);
|
||||||
|
void OnSize(wxSizeEvent& event);
|
||||||
void OnSubmit(wxCommandEvent& event);
|
void OnSubmit(wxCommandEvent& event);
|
||||||
void OnOptionsCheck(wxCommandEvent& event);
|
void OnOptionsCheck(wxCommandEvent& event);
|
||||||
void OnLogCheck(wxCommandEvent& event);
|
void OnLogCheck(wxCommandEvent& event);
|
||||||
|
|
Loading…
Reference in New Issue