Hack to make sure we never show scrollbar in preview window

This commit is contained in:
cncfanatics
2010-11-19 09:25:10 +01:00
parent 7929326b67
commit d5be272403

View File

@@ -383,13 +383,13 @@ class FittingView(d.Display):
for i in xrange(4):
wantedWidth += self.GetColumnWidth(i)
rect = self.GetRect()
# rect.height = min(rect.height, 400)
rect.width = min(rect.width, wantedWidth)
icount = self.GetItemCount()
irect = self.GetItemRect(0)
rect.height = irect.height* icount + irect.top if irect.height * icount + irect.top < rect.height else rect.height
rect = self.GetRect()
rect.height = min(irect.height * icount + irect.top, rect.height - 16)
rect.width = min(rect.width, wantedWidth)
mdc = wx.MemoryDC()
mbmp = wx.EmptyBitmap(rect.width, rect.height)
mdc.SelectObject(mbmp)