From 81bea3ef315f41894bd8554cdcd982bc44ec9ab7 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Mon, 27 Jun 2005 11:31:38 +0000 Subject: Changed list box maximum size calculation to take scroll bar width and image width into account which may help avoid truncation when using some fonts. --- win32/PlatWin.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'win32') diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx index 9346c3fbe..c902104fd 100644 --- a/win32/PlatWin.cxx +++ b/win32/PlatWin.cxx @@ -1365,7 +1365,9 @@ Point ListBoxX::MinTrackSize() const { } Point ListBoxX::MaxTrackSize() const { - PRectangle rc(0, 0, maxCharWidth * maxItemCharacters, ItemHeight() * lti.Count()); + PRectangle rc(0, 0, maxCharWidth * maxItemCharacters + + + TextOffset() + ::GetSystemMetrics(SM_CXVSCROLL), + ItemHeight() * lti.Count()); AdjustWindowRect(&rc); return Point(rc.Width(), rc.Height()); } -- cgit v1.2.3