Patch #3382 2012-11-30 14:21
p2rkw
Enlargment of autocomplete's listbox- Download
- 3382-Enlargment_of.patch (1.4 KB)
Index: src/sdk/wxscintilla/src/PlatWX.cpp
===================================================================
--- src/sdk/wxscintilla/src/PlatWX.cpp (wersja 8640)
+++ src/sdk/wxscintilla/src/PlatWX.cpp (kopia robocza)
@@ -1312,6 +1312,11 @@
PRectangle ListBoxImpl::GetDesiredRect()
{
+ /* C::B begin */
+ //maximum width of listbox:
+ static const int cMaxWidth = 1000;
+ /* C::B end */
+
// wxListCtrl doesn't have a DoGetBestSize, so instead we kept track of
// the max size in Append and calculate it here...
int maxw = maxStrWidth * aveCharWidth;
@@ -1321,8 +1326,8 @@
if (maxw == 0) maxw = 100;
maxw += aveCharWidth * 3 +
GETLBW(wid)->IconWidth() + wxSystemSettings::GetMetric(wxSYS_VSCROLL_X);
- if (maxw > 350)
- maxw = 350;
+ if (maxw > cMaxWidth)
+ maxw = cMaxWidth;
// estimate a desired height
int count = GETLB(wid)->GetItemCount();
@@ -1330,8 +1335,10 @@
wxRect rect;
GETLB(wid)->GetItemRect(0, rect);
maxh = count * rect.GetHeight();
- if (maxh > 140) // TODO: Use desiredVisibleRows??
- maxh = 140;
+ /* C::B begin */
+ if (maxh > desiredVisibleRows*lineHeight)
+ maxh = desiredVisibleRows*lineHeight;
+ /* C::B end */
// Try to make the size an exact multiple of some number of lines
int lines = maxh / rect.GetHeight();
History
p2rkw 2012-11-30 14:22
Wrong category, sorry.
mortenmacfly 2012-12-14 18:00
Seems interesting... I'll do some testing...