mirror of
https://github.com/lalbornoz/roar.git
synced 2024-12-22 20:36:37 +00:00
Fix canvas windows size regarding scrollbars.
This commit is contained in:
parent
ccb7a68208
commit
31bd138570
@ -43,6 +43,7 @@ class GuiWindow(wx.ScrolledWindow):
|
||||
def resize(self, newSize):
|
||||
self.size = newSize; self._updateScrollBars();
|
||||
self.SetMinSize(self.size); self.SetSize(wx.DefaultCoord, wx.DefaultCoord, *self.size);
|
||||
self.SetMinSize(self.parent.GetSize()); self.SetSize(wx.DefaultCoord, wx.DefaultCoord, *self.parent.GetSize())
|
||||
curWindow = self
|
||||
while curWindow != None:
|
||||
curWindow.Layout(); curWindow = curWindow.GetParent();
|
||||
@ -51,6 +52,7 @@ class GuiWindow(wx.ScrolledWindow):
|
||||
# __init__(self, parent, pos, scrollStep, style=0): initialisation method
|
||||
def __init__(self, parent, pos, scrollStep, style=0):
|
||||
super().__init__(parent, pos=pos, style=style) if style != 0 else super().__init__(parent, pos=pos)
|
||||
self.parent = parent
|
||||
self.pos, self.scrollFlag, self.scrollStep, self.size = pos, False, scrollStep, None
|
||||
for eventType, f in (
|
||||
(wx.EVT_CHAR, self.onKeyboardInput), (wx.EVT_CLOSE, self.onClose), (wx.EVT_ENTER_WINDOW, self.onEnterWindow),
|
||||
|
Loading…
Reference in New Issue
Block a user