From 1fd6f082bb0820fdcadee109e7e81226f51a8a2b Mon Sep 17 00:00:00 2001 From: Aditya Panchal Date: Wed, 17 Oct 2018 14:47:56 -0500 Subject: [PATCH 1/8] 2dview: Fix issues with keyboard and mousewheel navigation on Windows. --- dicompyler/baseplugins/2dview.py | 15 --------------- dicompyler/main.py | 4 ++-- 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/dicompyler/baseplugins/2dview.py b/dicompyler/baseplugins/2dview.py index c6a6953..6e8746c 100644 --- a/dicompyler/baseplugins/2dview.py +++ b/dicompyler/baseplugins/2dview.py @@ -589,13 +589,6 @@ def OnZoomOut(self, evt): def OnKeyDown(self, evt): """Change the image when the user presses the appropriate keys.""" - # Needed to work around a bug in Windows. See main.py for more details. - if guiutil.IsMSWindows(): - try: - evt = evt.data - except AttributeError: - keyname = evt.GetKeyCode() - if len(self.images): keyname = evt.GetKeyCode() prevkey = [wx.WXK_UP, wx.WXK_PAGEUP] @@ -624,14 +617,6 @@ def OnKeyDown(self, evt): def OnMouseWheel(self, evt): """Change the image when the user scrolls the mouse wheel.""" - # Needed to work around a bug in Windows. See main.py for more details. - if guiutil.IsMSWindows(): - try: - evt = evt.data - except AttributeError: - delta = evt.GetWheelDelta() - rot = evt.GetWheelRotation() - if len(self.images): delta = evt.GetWheelDelta() rot = evt.GetWheelRotation() diff --git a/dicompyler/main.py b/dicompyler/main.py index baa59da..5e188fb 100644 --- a/dicompyler/main.py +++ b/dicompyler/main.py @@ -833,7 +833,7 @@ def OnKeyDown(self, evt): notebook tab instead of the panel receives focus.""" if guiutil.IsMSWindows(): - pub.sendMessage('main.key_down', msg=evt) + pub.sendMessage('main.key_down', evt=evt) def OnMouseWheel(self, evt): """Capture the mousewheel event when the notebook tab is focused. @@ -841,7 +841,7 @@ def OnMouseWheel(self, evt): notebook tab instead of the panel receives focus.""" if guiutil.IsMSWindows(): - pub.sendMessage('main.mousewheel', msg=evt) + pub.sendMessage('main.mousewheel', evt=evt) def OnPreferences(self, evt): """Load and show the Preferences dialog box.""" From 5a3e280f8dcc7054fab0877beea00a3d5ed43065 Mon Sep 17 00:00:00 2001 From: Aditya Panchal Date: Thu, 25 Jul 2019 21:55:01 -0500 Subject: [PATCH 2/8] Create FUNDING.yml --- .github/FUNDING.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/FUNDING.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..625dace --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1 @@ +patreon: bastula From 3cc52907ffbdc87050e2f586eeee0214a516a5be Mon Sep 17 00:00:00 2001 From: Aditya Panchal Date: Sun, 5 Jan 2020 22:15:13 -0600 Subject: [PATCH 3/8] Pin upper bound of matplotlib to <2.2. Fixes #122. This is due to contour generation module being deprecated in later versions of matplotlib. --- requirements.txt | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 75ea30c..987eefd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ dicompyler-core[image]>=0.5.2 wxPython>=4.0.0b2 -matplotlib>=1.3 +matplotlib>=1.3,<2.2 numpy>=1.13.1 https://github.com/darcymason/pydicom/archive/master.zip diff --git a/setup.py b/setup.py index eedd472..6458d51 100755 --- a/setup.py +++ b/setup.py @@ -10,7 +10,7 @@ from setuptools import setup, find_packages requires = [ - 'matplotlib>=1.3.0', + 'matplotlib>=1.3.0,<2.2', 'numpy>=1.2.1', 'pillow>=1.0', 'dicompyler-core>=0.5.2', From d8c6d585fe4057c14122abe10ebe352717b392d0 Mon Sep 17 00:00:00 2001 From: Jonathan Martens Date: Thu, 6 May 2021 09:55:09 +0200 Subject: [PATCH 4/8] Use PySubSub instead of deprecated wx.lib.pubsub fixes #131 --- dicompyler/baseplugins/2dview.py | 2 +- dicompyler/baseplugins/anonymize.py | 2 +- dicompyler/baseplugins/dvh.py | 2 +- dicompyler/baseplugins/quickopen.py | 2 +- dicompyler/baseplugins/treeview.py | 2 +- dicompyler/dicomgui.py | 2 +- dicompyler/guiutil.py | 2 +- dicompyler/main.py | 2 +- dicompyler/plugin.py | 2 +- dicompyler/preferences.py | 4 ++-- requirements.txt | 3 +++ 11 files changed, 14 insertions(+), 11 deletions(-) diff --git a/dicompyler/baseplugins/2dview.py b/dicompyler/baseplugins/2dview.py index 6e8746c..accec68 100644 --- a/dicompyler/baseplugins/2dview.py +++ b/dicompyler/baseplugins/2dview.py @@ -10,7 +10,7 @@ import wx from wx.xrc import XmlResource, XRCCTRL, XRCID -from wx.lib.pubsub import pub +from pubsub import pub from matplotlib import _cntr as cntr from matplotlib import __version__ as mplversion import numpy as np diff --git a/dicompyler/baseplugins/anonymize.py b/dicompyler/baseplugins/anonymize.py index ad837c3..306e8b7 100755 --- a/dicompyler/baseplugins/anonymize.py +++ b/dicompyler/baseplugins/anonymize.py @@ -10,7 +10,7 @@ import wx from wx.xrc import XmlResource, XRCCTRL, XRCID -from wx.lib.pubsub import pub +from pubsub import pub import os, threading from dicompyler import guiutil, util diff --git a/dicompyler/baseplugins/dvh.py b/dicompyler/baseplugins/dvh.py index 2a0863c..a869d26 100755 --- a/dicompyler/baseplugins/dvh.py +++ b/dicompyler/baseplugins/dvh.py @@ -12,7 +12,7 @@ import wx from wx.xrc import XmlResource, XRCCTRL, XRCID -from wx.lib.pubsub import pub +from pubsub import pub from dicompyler import guiutil, util from dicompyler import guidvh import numpy as np diff --git a/dicompyler/baseplugins/quickopen.py b/dicompyler/baseplugins/quickopen.py index a84537f..7bd00c5 100644 --- a/dicompyler/baseplugins/quickopen.py +++ b/dicompyler/baseplugins/quickopen.py @@ -11,7 +11,7 @@ import logging logger = logging.getLogger('dicompyler.quickimport') import wx -from wx.lib.pubsub import pub +from pubsub import pub from dicompylercore import dicomparser from dicompyler import util diff --git a/dicompyler/baseplugins/treeview.py b/dicompyler/baseplugins/treeview.py index 8135cf3..df8983c 100755 --- a/dicompyler/baseplugins/treeview.py +++ b/dicompyler/baseplugins/treeview.py @@ -14,7 +14,7 @@ from six.moves import queue import wx from wx.xrc import XmlResource, XRCCTRL, XRCID -from wx.lib.pubsub import pub +from pubsub import pub from wx.dataview import TreeListCtrl as tlc from dicompyler import guiutil, util try: diff --git a/dicompyler/dicomgui.py b/dicompyler/dicomgui.py index 642e266..462a0b1 100755 --- a/dicompyler/dicomgui.py +++ b/dicompyler/dicomgui.py @@ -15,7 +15,7 @@ import hashlib, os, threading import wx from wx.xrc import * -from wx.lib.pubsub import pub +from pubsub import pub import numpy as np from dicompylercore import dicomparser from dicompyler import guiutil, util diff --git a/dicompyler/guiutil.py b/dicompyler/guiutil.py index c5ec10d..076802e 100755 --- a/dicompyler/guiutil.py +++ b/dicompyler/guiutil.py @@ -10,7 +10,7 @@ from dicompyler import util import wx from wx.xrc import XmlResource, XRCCTRL, XRCID -from wx.lib.pubsub import pub +from pubsub import pub def IsMSWindows(): """Are we running on Windows? diff --git a/dicompyler/main.py b/dicompyler/main.py index 5e188fb..b602505 100644 --- a/dicompyler/main.py +++ b/dicompyler/main.py @@ -20,7 +20,7 @@ import wx.adv import wx.lib.dialogs, webbrowser import pydicom -from wx.lib.pubsub import pub +from pubsub import pub from dicompylercore import dvhcalc from dicompyler import __version__ from dicompyler import guiutil, util diff --git a/dicompyler/plugin.py b/dicompyler/plugin.py index ff417b0..feab73b 100755 --- a/dicompyler/plugin.py +++ b/dicompyler/plugin.py @@ -12,7 +12,7 @@ import imp, os import wx from wx.xrc import * -from wx.lib.pubsub import pub +from pubsub import pub from dicompyler import guiutil, util def import_plugins(userpath=None): diff --git a/dicompyler/preferences.py b/dicompyler/preferences.py index 8d73980..c0b47a7 100755 --- a/dicompyler/preferences.py +++ b/dicompyler/preferences.py @@ -10,7 +10,7 @@ import os import wx from wx.xrc import * -from wx.lib.pubsub import pub +from pubsub import pub from dicompyler import guiutil, util try: @@ -377,7 +377,7 @@ def main(): import tempfile, os import wx - from wx.lib.pubsub import Publisher as pub + from pubsub import Publisher as pub app = wx.App(False) diff --git a/requirements.txt b/requirements.txt index 987eefd..8719332 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,3 +3,6 @@ wxPython>=4.0.0b2 matplotlib>=1.3,<2.2 numpy>=1.13.1 https://github.com/darcymason/pydicom/archive/master.zip + +# Fix #131 +PyPubSub From 368fb51d9e00d5a833979e896dc228541cfbc6fb Mon Sep 17 00:00:00 2001 From: Jonathan Martens Date: Mon, 1 Nov 2021 16:50:57 +0100 Subject: [PATCH 5/8] Fix import statement missed in search and replace in previous commit --- dicompyler/preferences.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dicompyler/preferences.py b/dicompyler/preferences.py index c0b47a7..7842dba 100755 --- a/dicompyler/preferences.py +++ b/dicompyler/preferences.py @@ -377,7 +377,7 @@ def main(): import tempfile, os import wx - from pubsub import Publisher as pub + from pubsub import pub app = wx.App(False) From 53a5e8aaa9b16cb7f7110a2ef387b2e826e22554 Mon Sep 17 00:00:00 2001 From: Jonathan Martens Date: Mon, 1 Nov 2021 14:28:07 +0100 Subject: [PATCH 6/8] Remove wxALIGN* when WX_EXPAND is also set --- dicompyler/baseplugins/anonymize.xrc | 16 +++--- dicompyler/baseplugins/dvh.xrc | 10 ++-- dicompyler/baseplugins/treeview.xrc | 8 +-- dicompyler/guiutil.py | 2 +- dicompyler/main.py | 6 +-- dicompyler/resources/dicomgui.xrc | 24 ++++----- dicompyler/resources/guiutil.xrc | 6 +-- dicompyler/resources/main.xrc | 76 ++++++++++++++-------------- dicompyler/resources/plugin.xrc | 36 ++++++------- dicompyler/resources/preferences.xrc | 4 +- 10 files changed, 94 insertions(+), 94 deletions(-) diff --git a/dicompyler/baseplugins/anonymize.xrc b/dicompyler/baseplugins/anonymize.xrc index d0c2204..20d0acb 100644 --- a/dicompyler/baseplugins/anonymize.xrc +++ b/dicompyler/baseplugins/anonymize.xrc @@ -23,12 +23,12 @@ - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND wxVERTICAL - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND 3 @@ -63,7 +63,7 @@ - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND 7,0 @@ -83,12 +83,12 @@ anonymous - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND wxHORIZONTAL - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND 0,5 @@ -124,7 +124,7 @@ wxALIGN_CENTRE - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND 0,5 @@ -169,7 +169,7 @@ wxVERTICAL - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND 3 @@ -191,7 +191,7 @@ - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND 3 diff --git a/dicompyler/baseplugins/dvh.xrc b/dicompyler/baseplugins/dvh.xrc index e4c51b9..2d2ec2d 100644 --- a/dicompyler/baseplugins/dvh.xrc +++ b/dicompyler/baseplugins/dvh.xrc @@ -10,12 +10,12 @@ - wxALL|wxEXPAND|wxALIGN_CENTRE|wxADJUST_MINSIZE + wxALL|wxEXPAND|wxADJUST_MINSIZE 4 - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND @@ -74,7 +74,7 @@ 0 - wxALL|wxEXPAND|wxALIGN_CENTRE_VERTICAL + wxALL|wxEXPAND 3,0 @@ -126,12 +126,12 @@ - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND wxHORIZONTAL - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND wxVERTICAL diff --git a/dicompyler/baseplugins/treeview.xrc b/dicompyler/baseplugins/treeview.xrc index 82f4ad1..86849eb 100644 --- a/dicompyler/baseplugins/treeview.xrc +++ b/dicompyler/baseplugins/treeview.xrc @@ -25,7 +25,7 @@ wxVERTICAL - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND 1 @@ -39,16 +39,16 @@ - wxALL|wxEXPAND|wxALIGN_CENTRE|wxADJUST_MINSIZE + wxALL|wxEXPAND|wxADJUST_MINSIZE - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND wxVERTICAL - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND wxVERTICAL diff --git a/dicompyler/guiutil.py b/dicompyler/guiutil.py index 076802e..8fae7f8 100755 --- a/dicompyler/guiutil.py +++ b/dicompyler/guiutil.py @@ -200,7 +200,7 @@ def __init__(self, parent, item, data=None, color=None, pubsubname=''): grid.Add((3,0), 0) grid.Add(self.colorbox, 0, flag=wx.ALIGN_CENTRE) grid.Add((5,0), 0) - grid.Add(self.checkbox, 1, flag=wx.EXPAND|wx.ALL|wx.ALIGN_CENTRE) + grid.Add(self.checkbox, 1, flag=wx.EXPAND|wx.ALL) # Decrease the font size on Mac if IsMac(): diff --git a/dicompyler/main.py b/dicompyler/main.py index b602505..78639ef 100644 --- a/dicompyler/main.py +++ b/dicompyler/main.py @@ -129,11 +129,11 @@ def LogExcepthook(*exc_info): mainGrid = wx.BoxSizer(wx.VERTICAL) hGrid = wx.BoxSizer(wx.HORIZONTAL) if guiutil.IsMac(): - hGrid.Add(self.panelGeneral, 1, flag=wx.EXPAND|wx.ALL|wx.ALIGN_CENTRE, border=4) + hGrid.Add(self.panelGeneral, 1, flag=wx.EXPAND|wx.ALL, border=4) else: - hGrid.Add(self.panelGeneral, 1, flag=wx.EXPAND|wx.ALL|wx.ALIGN_CENTRE) + hGrid.Add(self.panelGeneral, 1, flag=wx.EXPAND|wx.ALL) - mainGrid.Add(hGrid, 1, flag=wx.EXPAND|wx.ALL|wx.ALIGN_CENTRE) + mainGrid.Add(hGrid, 1, flag=wx.EXPAND|wx.ALL) # Load the menu for the frame menuMain = self.res.LoadMenuBar('menuMain') diff --git a/dicompyler/resources/dicomgui.xrc b/dicompyler/resources/dicomgui.xrc index 3a95b6e..b2e3e8c 100644 --- a/dicompyler/resources/dicomgui.xrc +++ b/dicompyler/resources/dicomgui.xrc @@ -23,7 +23,7 @@ - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND wxVERTICAL @@ -41,7 +41,7 @@ - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND 3 @@ -50,18 +50,18 @@ 2,0 - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND accept.png - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND 16,16 2,0 - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND @@ -82,11 +82,11 @@ wxVERTICAL - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND wxHORIZONTAL - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND 0,5 @@ -97,7 +97,7 @@ - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND 0,5 @@ -148,7 +148,7 @@ wxHORIZONTAL - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND 0,5 @@ -200,14 +200,14 @@ wxHORIZONTAL - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND 0,9 wxVERTICAL - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND 3 @@ -229,7 +229,7 @@ - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND 3 diff --git a/dicompyler/resources/guiutil.xrc b/dicompyler/resources/guiutil.xrc index a5cf8e6..c4f662d 100644 --- a/dicompyler/resources/guiutil.xrc +++ b/dicompyler/resources/guiutil.xrc @@ -22,7 +22,7 @@ wxHORIZONTAL - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND 5,0 @@ -34,7 +34,7 @@ 0 - wxLEFT|wxRIGHT|wxEXPAND|wxALIGN_CENTRE + wxLEFT|wxRIGHT|wxEXPAND @@ -64,7 +64,7 @@ 1 - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND 10 diff --git a/dicompyler/resources/main.xrc b/dicompyler/resources/main.xrc index 33ade20..41c9176 100644 --- a/dicompyler/resources/main.xrc +++ b/dicompyler/resources/main.xrc @@ -22,7 +22,7 @@ - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND @@ -38,7 +38,7 @@ - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND @@ -53,10 +53,10 @@ 1 - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND @@ -64,11 +64,11 @@ - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND @@ -80,7 +80,7 @@ 1 0 - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND 0 @@ -159,17 +159,17 @@ 1 - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND wxVERTICAL - wxLEFT|wxRIGHT|wxEXPAND|wxALIGN_CENTRE + wxLEFT|wxRIGHT|wxEXPAND wxVERTICAL - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND 1 @@ -188,7 +188,7 @@ - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND @@ -199,7 +199,7 @@ - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND @@ -209,7 +209,7 @@ - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND @@ -219,7 +219,7 @@ - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND 8 2 @@ -234,28 +234,28 @@ wxVERTICAL - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND 0,2 - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND wxVERTICAL - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND wxVERTICAL - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND 3 @@ -267,13 +267,13 @@ - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND @@ -288,35 +288,35 @@ - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND wxHORIZONTAL - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND wxHORIZONTAL - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND wxVERTICAL - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND @@ -324,22 +324,22 @@ - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND wxHORIZONTAL - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND @@ -357,11 +357,11 @@ - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND wxHORIZONTAL - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND @@ -370,23 +370,23 @@ wxVERTICAL - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND wxHORIZONTAL - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND diff --git a/dicompyler/resources/plugin.xrc b/dicompyler/resources/plugin.xrc index 5324d67..f4593fb 100644 --- a/dicompyler/resources/plugin.xrc +++ b/dicompyler/resources/plugin.xrc @@ -25,11 +25,11 @@ - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND 10,0 @@ -67,7 +67,7 @@ 5,0 - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND @@ -84,7 +84,7 @@ wxHORIZONTAL - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND 0,7 @@ -110,7 +110,7 @@ 5,0 - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND @@ -119,7 +119,7 @@ wxHORIZONTAL - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND 0,5 @@ -137,29 +137,29 @@ - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND wxHORIZONTAL - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND wxVERTICAL - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND 5,5 - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND 0,5 @@ -167,7 +167,7 @@ wxVERTICAL - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND 3 @@ -175,7 +175,7 @@ 0,5 - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND @@ -187,28 +187,28 @@ 0,5 - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND 3 0,5 - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND 3 wxHORIZONTAL - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND wxVERTICAL 10,10 - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND 600,400 diff --git a/dicompyler/resources/preferences.xrc b/dicompyler/resources/preferences.xrc index 0c04706..2eed56d 100644 --- a/dicompyler/resources/preferences.xrc +++ b/dicompyler/resources/preferences.xrc @@ -7,7 +7,7 @@ 550,350 - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND 7 wxVERTICAL @@ -19,7 +19,7 @@ - wxALL|wxEXPAND|wxALIGN_CENTRE + wxALL|wxEXPAND 7 From bc0aa42e006d2ec90e9cc8a28cca685aaba0bf60 Mon Sep 17 00:00:00 2001 From: Jonathan Martens Date: Mon, 1 Nov 2021 15:30:07 +0100 Subject: [PATCH 7/8] Use wx.Cursor() instead of deprecated wx.CursorFromImage() --- dicompyler/baseplugins/2dview.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dicompyler/baseplugins/2dview.py b/dicompyler/baseplugins/2dview.py index accec68..dfaf78a 100644 --- a/dicompyler/baseplugins/2dview.py +++ b/dicompyler/baseplugins/2dview.py @@ -674,7 +674,7 @@ def OnMouseMotion(self, evt): # Custom cursors with > 2 colors only works on Windows currently if guiutil.IsMSWindows(): image = wx.Image(util.GetResourcePath('contrast_high.png')) - self.SetCursor(wx.CursorFromImage(image)) + self.SetCursor(wx.Cursor(image)) # Update the positon and values of the mouse cursor self.mousepos = evt.GetPosition() self.OnUpdatePositionValues(evt) From 38adb8abf8eb94d8418ee1977895f7121b874081 Mon Sep 17 00:00:00 2001 From: Jonathan Martens Date: Mon, 1 Nov 2021 16:18:23 +0100 Subject: [PATCH 8/8] Fix wxALIGN_LEFT/wxALIGN_RIGHT has no effect in horizontal box sizer error --- dicompyler/baseplugins/dvh.xrc | 8 ++++---- dicompyler/resources/dicomgui.xrc | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dicompyler/baseplugins/dvh.xrc b/dicompyler/baseplugins/dvh.xrc index 2d2ec2d..1c0be9b 100644 --- a/dicompyler/baseplugins/dvh.xrc +++ b/dicompyler/baseplugins/dvh.xrc @@ -27,7 +27,7 @@ - wxALIGN_RIGHT|wxALIGN_CENTRE_VERTICAL + wxALIGN_CENTRE_VERTICAL 3,0 @@ -42,7 +42,7 @@ 0 - wxALIGN_LEFT|wxALIGN_CENTRE_VERTICAL + wxALIGN_CENTRE_VERTICAL 5,0 @@ -52,7 +52,7 @@ - wxALIGN_RIGHT|wxALIGN_CENTRE_VERTICAL + wxALIGN_CENTRE_VERTICAL 3,0 @@ -83,7 +83,7 @@ - wxALIGN_LEFT|wxALIGN_CENTRE_VERTICAL + wxALIGN_CENTRE_VERTICAL 5,0 diff --git a/dicompyler/resources/dicomgui.xrc b/dicompyler/resources/dicomgui.xrc index b2e3e8c..9020e1f 100644 --- a/dicompyler/resources/dicomgui.xrc +++ b/dicompyler/resources/dicomgui.xrc @@ -12,7 +12,7 @@ - wxALIGN_LEFT|wxALIGN_CENTRE_VERTICAL + wxALIGN_CENTRE_VERTICAL 5,0