Use proper height

This commit is contained in:
HomeWorld
2010-11-19 10:10:02 +02:00
parent 06357db79b
commit 8af14f8894
2 changed files with 5 additions and 2 deletions

View File

@@ -1198,7 +1198,7 @@ class PFNotebookPagePreview(wx.Frame):
self.timerSleepId = wx.NewId()
self.direction = 1
self.transp = 0
self.SetSize((bitmap.GetWidth(),bitmap.GetHeight()))
self.SetSize((bitmap.GetWidth(),bitmap.GetHeight()+16))
self.SetTransparent(0)
self.Refresh()

View File

@@ -383,9 +383,12 @@ class FittingView(d.Display):
for i in xrange(4):
wantedWidth += self.GetColumnWidth(i)
rect = self.GetRect()
rect.height = min(rect.height, 400)
# 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
mdc = wx.MemoryDC()
mbmp = wx.EmptyBitmap(rect.width, rect.height)
mdc.SelectObject(mbmp)