don't make the log dialog taller than the screen (patch 457695)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12271 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2001-11-02 17:52:27 +00:00
parent fe7b9ed6fd
commit 4d509295ee

View File

@@ -869,7 +869,13 @@ void wxLogDialog::CreateDetailsControls()
int y;
GetTextExtent(_T("H"), (int*)NULL, &y, (int*)NULL, (int*)NULL, &font);
int height = wxMax(y*(count + 3), 100);
m_listctrl->SetSize(-1, height);
// if the height as computed from list items exceeds, together with the
// actual message & controls, the screen, make it smaller
int heightMax =
(3*wxSystemSettings::GetSystemMetric(wxSYS_SCREEN_Y))/5 - GetSize().y;
m_listctrl->SetSize(-1, wxMin(height, heightMax));
}
void wxLogDialog::OnListSelect(wxListEvent& event)