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