From 4d509295ee43d8b26096dd068eb04993fe7ab4d8 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 2 Nov 2001 17:52:27 +0000 Subject: [PATCH] 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 --- src/generic/logg.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/generic/logg.cpp b/src/generic/logg.cpp index 68555e35e6..fcfe1afc43 100644 --- a/src/generic/logg.cpp +++ b/src/generic/logg.cpp @@ -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) -- 2.45.2