From 1f043e9632fb250eb13f0ede58257ebfded2ed82 Mon Sep 17 00:00:00 2001 From: Neil Date: Sun, 2 Feb 2014 18:04:02 +1100 Subject: Fix bug when resizing list with only short strings caused the list to move. --- win32/PlatWin.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx index f2a0747c6..a97012e6f 100644 --- a/win32/PlatWin.cxx +++ b/win32/PlatWin.cxx @@ -2532,8 +2532,9 @@ POINT ListBoxX::MinTrackSize() const { POINT ListBoxX::MaxTrackSize() const { PRectangle rc(0, 0, + Platform::Maximum(MinClientWidth(), maxCharWidth * maxItemCharacters + TextInset.x * 2 + - TextOffset() + ::GetSystemMetrics(SM_CXVSCROLL), + TextOffset() + ::GetSystemMetrics(SM_CXVSCROLL)), ItemHeight() * lti.Count()); AdjustWindowRect(&rc); POINT ret = {static_cast(rc.Width()), static_cast(rc.Height())}; -- cgit v1.2.3