mirror of
https://github.com/lalbornoz/roar.git
synced 2024-11-21 14:56:37 +00:00
Various bugfixes.
1) Fix erroneous canvas repositioning on resize given no docked toolbars. 2) Correctly update scrollbar parameters when changing font (and hence cell) size.
This commit is contained in:
parent
4b98d1cdf1
commit
de96a7cdaa
@ -23,6 +23,5 @@ Release roadmap:
|
||||
3) operators: crop, scale, shift, slice
|
||||
4) auto{load,save} & {backup,restore}
|
||||
5) tools: unicode block elements
|
||||
6) bugs: a) undock all toolbars & resize window b) increase cell size, scroll down
|
||||
|
||||
vim:ff=dos tw=0
|
||||
|
@ -216,7 +216,7 @@ class RoarCanvasWindow(GuiWindow):
|
||||
newFontSize = self.backend.fontSize + fd
|
||||
if newFontSize > 0:
|
||||
self.backend.fontSize = newFontSize
|
||||
self.backend.resize(self.canvas.size)
|
||||
self.backend.resize(self.canvas.size); self.scrollStep = self.backend.cellSize;
|
||||
super().resize([a * b for a, b in zip(self.canvas.size, self.backend.cellSize)])
|
||||
eventDc = self.backend.getDeviceContext(self.GetClientSize(), self)
|
||||
eventDcOrigin = eventDc.GetDeviceOrigin(); eventDc.SetDeviceOrigin(0, 0);
|
||||
|
@ -28,9 +28,6 @@ class RoarClient(GuiFrame):
|
||||
def onChar(self, event):
|
||||
self.canvasPanel.onKeyboardInput(event)
|
||||
|
||||
def onMouseWheel(self, event):
|
||||
self.canvasPanel.GetEventHandler().ProcessEvent(event)
|
||||
|
||||
def onClose(self, event):
|
||||
if not self.canvasPanel.commands.exiting:
|
||||
closeFlag = self.canvasPanel.commands._promptSaveChanges()
|
||||
@ -39,6 +36,12 @@ class RoarClient(GuiFrame):
|
||||
if closeFlag:
|
||||
event.Skip();
|
||||
|
||||
def onMouseWheel(self, event):
|
||||
self.canvasPanel.GetEventHandler().ProcessEvent(event)
|
||||
|
||||
def onSize(self, event):
|
||||
pass
|
||||
|
||||
def __init__(self, parent, defaultCanvasPos=(0, 75), defaultCanvasSize=(100, 30), size=(840, 640), title=""):
|
||||
super().__init__(self._getIconPathName(), size, parent, title)
|
||||
self.canvas = Canvas(defaultCanvasSize)
|
||||
@ -63,7 +66,7 @@ class RoarClient(GuiFrame):
|
||||
self.canvasPanel.commands.canvasClearRecent.attrDict["id"] = wx.NewId()
|
||||
menuItemWindow = self.canvasPanel.commands.canvasOpenRecent.attrDict["menu"].Append(self.canvasPanel.commands.canvasClearRecent.attrDict["id"], self.canvasPanel.commands.canvasClearRecent.attrDict["label"], self.canvasPanel.commands.canvasClearRecent.attrDict["caption"])
|
||||
self.canvasPanel.commands.canvasOpenRecent.attrDict["menu"].Bind(wx.EVT_MENU, self.canvasPanel.commands.canvasClearRecent, menuItemWindow)
|
||||
self.Bind(wx.EVT_CLOSE, self.onClose)
|
||||
self.Bind(wx.EVT_CLOSE, self.onClose); self.Bind(wx.EVT_SIZE, self.onSize);
|
||||
self.toolBarPanes[0].BestSize(0, 0).Right(); self.toolBarPanes[1].BestSize(0, 0).Right(); self.auiManager.Update();
|
||||
|
||||
# vim:expandtab foldmethod=marker sw=4 ts=4 tw=120
|
||||
|
Loading…
Reference in New Issue
Block a user