X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9cf4b4398d733123709f8319c13e52afd0f67ef7..11bfe4bfdc79b0374a0f287dac80efa262b365a7:/src/msw/textctrl.cpp?ds=sidebyside diff --git a/src/msw/textctrl.cpp b/src/msw/textctrl.cpp index 7604356776..bcabaabb7d 100644 --- a/src/msw/textctrl.cpp +++ b/src/msw/textctrl.cpp @@ -1886,12 +1886,12 @@ bool wxTextCtrl::MSWCommand(WXUINT param, WXWORD WXUNUSED(id)) return true; } -WXHBRUSH wxTextCtrl::MSWControlColor(WXHDC hDC) +WXHBRUSH wxTextCtrl::MSWControlColor(WXHDC hDC, WXHWND hWnd) { if ( !IsEnabled() && !HasFlag(wxTE_MULTILINE) ) return MSWControlColorDisabled(hDC); - return wxTextCtrlBase::MSWControlColorSolid(hDC); + return wxTextCtrlBase::MSWControlColor(hDC, hWnd); } bool wxTextCtrl::AdjustSpaceLimit() @@ -1960,7 +1960,7 @@ wxSize wxTextCtrl::DoGetBestSize() const int hText = cy; if ( m_windowStyle & wxTE_MULTILINE ) { - hText *= wxMax(GetNumberOfLines(), 5); + hText *= wxMax(wxMin(GetNumberOfLines(), 10), 2); } //else: for single line control everything is ok