#include "wx/sizer.h"
#include "wx/statbmp.h"
#include "wx/button.h"
+ #include "wx/settings.h"
#endif // WX_PRECOMP
#if wxUSE_LOGGUI || wxUSE_LOGWINDOW
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)
wxString msg;
TimeStamp(&msg);
-#ifdef __WXMAC__
+#if defined(__WXMAC__) && !defined(__DARWIN__)
// VZ: this is a bug in wxMac, it *must* accept '\n' as new line, the
// translation must be done in wxTextCtrl, not here! (FIXME)
msg << szString << wxT('\r');