From 70ddf4dab891677b6a966ca7be1ed0e533fffee6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucio=20Andr=C3=A9s=20Illanes=20Albornoz?= Date: Tue, 24 Sep 2019 14:39:37 +0200 Subject: [PATCH] Fix canvas windows size regarding scrollbars. assets/text/TODO: updated. libroar/RoarClient.py: I FUCKING _HATE_ WXPYTHON --- assets/text/TODO | 21 ++++++++++----------- libroar/RoarClient.py | 4 ++++ 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/assets/text/TODO b/assets/text/TODO index 9be9329..3908635 100644 --- a/assets/text/TODO +++ b/assets/text/TODO @@ -16,16 +16,15 @@ d) replace resize buttons w/ {-,edit box,+} buttons & lock button re: ratio (ty lol3) Release roadmap: -1) BUG: a) start w/ spoke-vxplion.txt b) scroll down c) fix w/ canvas resize -2) BUG: fix & finish Arabic/RTL text tool support -3) BUG: a) text tool b) paste text c) undo -4) BUG: a) tile once b) tile twice -5) {copy,cut,delete,insert from,paste}, edit asset in new canvas, import from {canvas,object} -6) add hotkeys.txt mIRC art canvas to help menu -7) {load,store} LRU {open,save} directory -8) operators: crop, scale, shift, slice -9) auto{load,save} & {backup,restore} -10) tools: unicode block elements -11) floating/dockable toolbar +1) BUG: fix & finish Arabic/RTL text tool support +2) BUG: a) text tool b) paste text c) undo +3) BUG: a) tile once b) tile twice +4) {copy,cut,delete,insert from,paste}, edit asset in new canvas, import from {canvas,object} +5) add hotkeys.txt mIRC art canvas to help menu +6) {load,store} LRU {open,save} directory +7) operators: crop, scale, shift, slice +8) auto{load,save} & {backup,restore} +9) tools: unicode block elements +10) floating/dockable toolbar vim:ff=dos tw=0 diff --git a/libroar/RoarClient.py b/libroar/RoarClient.py index aed78c6..044aae9 100644 --- a/libroar/RoarClient.py +++ b/libroar/RoarClient.py @@ -31,6 +31,9 @@ class RoarClient(GuiFrame): def onMouseWheel(self, event): self.canvasPanel.GetEventHandler().ProcessEvent(event) + def onSize(self, event): + self.canvasPanel.SetMinSize(self.GetSize()); self.canvasPanel.SetSize(wx.DefaultCoord, wx.DefaultCoord, *self.GetSize()); event.Skip(); + # # __init__(self, parent, defaultCanvasPos=(0, 75), defaultCanvasSize=(100, 30), defaultCellSize=(7, 14), size=(840, 630), title=""): initialisation method def __init__(self, parent, defaultCanvasPos=(0, 75), defaultCanvasSize=(100, 30), defaultCellSize=(7, 14), size=(840, 630), title=""): @@ -58,5 +61,6 @@ 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_SIZE, self.onSize) # vim:expandtab foldmethod=marker sw=4 ts=4 tw=120