Skip to content

Commit 90d1fdb

Browse files
committed
Merge branch 'support-wxpython-4'
* refactor wx calls to support both WX3 and WX4 APIs * add `wx12` module to backport WX4-like calls to WX3 * add unit tests for the modified code Resolve #33. Resolve #34.
2 parents 3412cff + 50943ae commit 90d1fdb

85 files changed

Lines changed: 3012 additions & 2291 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.travis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ before_install:
7070
- $NOAPT || sudo apt-get install -y
7171
build-essential libgsl0-dev python-dev
7272
python-numpy python-setuptools python-pip python-wxtools
73+
python-matplotlib
7374
- $NOAPT || devutils/makesdist
7475
- $NOAPT || MYTARBUNDLE="$(ls -t "${PWD}"/dist/*.tar.gz | head -1)"
7576

@@ -80,11 +81,10 @@ install:
8081
- $NOMC || source activate testenv
8182
- $NOMC || conda install --yes --use-local --file=/tmp/mypackage.txt
8283

83-
# TODO - remove after fix of libgsl.a location in pdffit2
84-
- $NOAPT || sudo ln -si /usr/lib/x86_64-linux-gnu/libgsl.a /usr/lib/libgsl.a
85-
8684
- $NOAPT || pip install $MYPIPFLAGS coverage
87-
- $NOAPT || pip install $MYPIPFLAGS "${MYTARBUNDLE}"
85+
# TODO - restore pip install once it works.
86+
# - $NOAPT || pip install $MYPIPFLAGS "${MYTARBUNDLE}"
87+
- $NOAPT || easy_install --user "${MYTARBUNDLE}"
8888

8989
- cd ${MYRUNDIR}
9090
- MYGIT_REV=$(python -c "import ${MYNAME}.version as v; print(v.__git_commit__)")

conda-recipe/bld.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
%PYTHON% -m pip install --no-deps -vv .
1+
%PYTHON% -m easy_install --no-deps .
22
if errorlevel 1 exit 1
33

44
:: Add more build steps here, if they are necessary.

conda-recipe/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
$PYTHON -m pip install --no-deps -vv .
3+
$PYTHON -m easy_install --no-deps .
44

55
# Add more build steps here, if they are necessary.
66

conda-recipe/meta.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ requirements:
3636
- python
3737
- setuptools
3838
- matplotlib
39-
- wxpython 3.*
39+
- wxpython 4.*
4040
- menuinst [win]
4141
- diffpy.pdffit2
4242
- diffpy.structure

src/diffpy/pdfgui/gui/aboutdialog.py

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,10 @@ def __init__(self, *args, **kwds):
8787
self.label_acknowledgement = wx.StaticText(self, wx.ID_ANY, "")
8888
self.hyperlink_paper = wx.lib.agw.hyperlink.HyperLinkCtrl(self, wx.ID_ANY, _paper, URL=_paper)
8989
self.static_line_2 = wx.StaticLine(self, wx.ID_ANY)
90-
self.bitmap_button_nsf = wx.BitmapButton(self, wx.ID_ANY, wx.NullBitmap)
91-
self.bitmap_button_danse = wx.BitmapButton(self, wx.ID_ANY, wx.NullBitmap)
92-
self.bitmap_button_msu = wx.BitmapButton(self, wx.ID_ANY, wx.NullBitmap)
93-
self.bitmap_button_columbia = wx.BitmapButton(self, wx.ID_ANY, wx.NullBitmap)
90+
self.bitmap_button_nsf = wx.BitmapButton(self, wx.ID_ANY, wx.NullBitmap, style=wx.BU_AUTODRAW)
91+
self.bitmap_button_danse = wx.BitmapButton(self, wx.ID_ANY, wx.NullBitmap, style=wx.BU_AUTODRAW)
92+
self.bitmap_button_msu = wx.BitmapButton(self, wx.ID_ANY, wx.NullBitmap, style=wx.BU_AUTODRAW)
93+
self.bitmap_button_columbia = wx.BitmapButton(self, wx.ID_ANY, wx.NullBitmap, style=wx.BU_AUTODRAW)
9494
self.static_line_3 = wx.StaticLine(self, wx.ID_ANY)
9595
self.button_OK = wx.Button(self, wx.ID_OK, "OK")
9696

@@ -136,8 +136,8 @@ def __set_properties(self):
136136
# begin wxGlade: DialogAbout.__set_properties
137137
self.SetTitle("About")
138138
self.SetSize((600, 595))
139-
self.label_title.SetFont(wx.Font(26, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))
140-
self.label_version.SetFont(wx.Font(26, wx.DEFAULT, wx.NORMAL, wx.NORMAL, 0, ""))
139+
self.label_title.SetFont(wx.Font(26, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_BOLD, 0, ""))
140+
self.label_version.SetFont(wx.Font(26, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, 0, ""))
141141
self.hyperlink_license.Enable(False)
142142
self.hyperlink_license.Hide()
143143
self.bitmap_button_nsf.SetSize(self.bitmap_button_nsf.GetBestSize())
@@ -207,19 +207,9 @@ def onColumbiaLogo(self, event): # wxGlade: DialogAbout.<event_handler>
207207

208208
# end of class DialogAbout
209209

210-
##### testing code ############################################################
211-
class MyApp(wx.App):
212-
def OnInit(self):
213-
dialog = DialogAbout(None, -1, "")
214-
self.SetTopWindow(dialog)
215-
dialog.ShowModal()
216-
dialog.Destroy()
217-
return True
218-
219-
# end of class MyApp
210+
##### testing code ###########################################################
220211

221212
if __name__ == "__main__":
222-
app = MyApp(0)
223-
app.MainLoop()
224-
225-
##### end of testing code #####################################################
213+
app = wx.App()
214+
dialog = DialogAbout(None, -1, "")
215+
dialog.ShowModal()

src/diffpy/pdfgui/gui/adddatapanel.py

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#
1515
##############################################################################
1616

17-
# generated by wxGlade 0.4 on Wed Feb 22 19:59:11 2006
17+
# generated by wxGlade 0.9.3 on Fri Jul 19 15:56:56 2019
1818

1919
import wx
2020
from diffpy.pdfgui.gui.fittree import incrementName
@@ -36,40 +36,39 @@ class AddDataPanel(wx.Panel, PDFPanel):
3636
def __init__(self, *args, **kwds):
3737
PDFPanel.__init__(self)
3838
# begin wxGlade: AddDataPanel.__init__
39-
kwds["style"] = wx.TAB_TRAVERSAL
39+
kwds["style"] = kwds.get("style", 0) | wx.TAB_TRAVERSAL
4040
wx.Panel.__init__(self, *args, **kwds)
41-
self.textLoadData = wx.StaticText(self, -1, "Load a data set from file.")
41+
self.textLoadData = wx.StaticText(self, wx.ID_ANY, "Load a data set from file.")
4242
self.buttonOpen = wx.Button(self, wx.ID_OPEN, "Open")
43-
self.static_line_2 = wx.StaticLine(self, -1)
43+
self.static_line_2 = wx.StaticLine(self, wx.ID_ANY)
4444
self.buttonCancel = wx.Button(self, wx.ID_CANCEL, "Cancel")
4545

4646
self.__set_properties()
4747
self.__do_layout()
4848

49-
self.Bind(wx.EVT_BUTTON, self.onOpen, id=wx.ID_OPEN)
50-
self.Bind(wx.EVT_BUTTON, self.onCancel, id=wx.ID_CANCEL)
49+
self.Bind(wx.EVT_BUTTON, self.onOpen, self.buttonOpen)
50+
self.Bind(wx.EVT_BUTTON, self.onCancel, self.buttonCancel)
5151
# end wxGlade
5252
self.__customProperties()
5353

5454
def __set_properties(self):
5555
# begin wxGlade: AddDataPanel.__set_properties
56-
self.textLoadData.SetFont(wx.Font(12, wx.DEFAULT, wx.NORMAL, wx.NORMAL, 0, ""))
56+
self.textLoadData.SetFont(wx.Font(12, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, 0, "Sans"))
5757
# end wxGlade
5858

5959
def __do_layout(self):
6060
# begin wxGlade: AddDataPanel.__do_layout
6161
sizer_1 = wx.BoxSizer(wx.VERTICAL)
6262
sizer_4 = wx.BoxSizer(wx.HORIZONTAL)
63-
sizer_4.Add(self.textLoadData, 1, wx.ALL|wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, 5)
64-
sizer_4.Add(self.buttonOpen, 0, wx.ALL|wx.ALIGN_RIGHT|wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, 5)
65-
sizer_1.Add(sizer_4, 0, wx.TOP|wx.BOTTOM|wx.EXPAND, 5)
66-
sizer_1.Add(self.static_line_2, 0, wx.BOTTOM|wx.EXPAND, 10)
67-
sizer_1.Add(self.buttonCancel, 0, wx.ALL|wx.ALIGN_RIGHT|wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, 5)
68-
sizer_1.Add((450, 0), 0, wx.ADJUST_MINSIZE, 0)
69-
self.SetAutoLayout(True)
63+
sizer_4.Add(self.textLoadData, 1, wx.ALIGN_CENTER_VERTICAL | wx.ALL, 5)
64+
sizer_4.Add(self.buttonOpen, 0, wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_RIGHT | wx.ALL, 5)
65+
sizer_1.Add(sizer_4, 0, wx.BOTTOM | wx.EXPAND | wx.TOP, 5)
66+
sizer_1.Add(self.static_line_2, 0, wx.BOTTOM | wx.EXPAND, 10)
67+
sizer_1.Add(self.buttonCancel, 0, wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_RIGHT | wx.ALL, 5)
68+
sizer_1.Add((450, 0), 0, 0, 0)
7069
self.SetSizer(sizer_1)
7170
sizer_1.Fit(self)
72-
sizer_1.SetSizeHints(self)
71+
self.Layout()
7372
# end wxGlade
7473

7574
# UTILITY FUNCTIONS ####
@@ -130,7 +129,7 @@ def onOpen(self, event): # wxGlade: AddDataPanel.<event_handler>
130129
"PDF calculation files (*.calc)", "*.calc",
131130
"All Files", "*"
132131
))
133-
d = wx.FileDialog(None, "Choose a file", dir, "", matchstring, wx.OPEN)
132+
d = wx.FileDialog(None, "Choose a file", dir, "", matchstring)
134133
if d.ShowModal() == wx.ID_OK:
135134
self.fullpath = d.GetPath()
136135
self.mainFrame.workpath = os.path.dirname(self.fullpath)

src/diffpy/pdfgui/gui/addphasepanel.py

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#
1515
##############################################################################
1616

17-
# generated by wxGlade 0.4 on Wed Feb 22 19:57:53 2006
17+
# generated by wxGlade 0.9.3 on Fri Jul 19 15:59:31 2019
1818

1919
import wx
2020
from diffpy.pdfgui.gui.fittree import incrementName
@@ -35,50 +35,49 @@ class AddPhasePanel(wx.Panel, PDFPanel):
3535
def __init__(self, *args, **kwds):
3636
PDFPanel.__init__(self)
3737
# begin wxGlade: AddPhasePanel.__init__
38-
kwds["style"] = wx.TAB_TRAVERSAL
38+
kwds["style"] = kwds.get("style", 0) | wx.TAB_TRAVERSAL
3939
wx.Panel.__init__(self, *args, **kwds)
40-
self.labelOpenPhase = wx.StaticText(self, -1, "Load a structure from file.")
40+
self.labelOpenPhase = wx.StaticText(self, wx.ID_ANY, "Load a structure from file.")
4141
self.buttonOpen = wx.Button(self, wx.ID_OPEN, "Open")
42-
self.static_line_5 = wx.StaticLine(self, -1)
43-
self.labelCreatePhase = wx.StaticText(self, -1, "Create a structure from scratch.")
42+
self.static_line_5 = wx.StaticLine(self, wx.ID_ANY)
43+
self.labelCreatePhase = wx.StaticText(self, wx.ID_ANY, "Create a structure from scratch.")
4444
self.buttonNew = wx.Button(self, wx.ID_NEW, "New")
45-
self.static_line_6 = wx.StaticLine(self, -1)
45+
self.static_line_6 = wx.StaticLine(self, wx.ID_ANY)
4646
self.buttonCancel = wx.Button(self, wx.ID_CANCEL, "Cancel")
4747

4848
self.__set_properties()
4949
self.__do_layout()
5050

51-
self.Bind(wx.EVT_BUTTON, self.onOpen, id=wx.ID_OPEN)
52-
self.Bind(wx.EVT_BUTTON, self.onNew, id=wx.ID_NEW)
53-
self.Bind(wx.EVT_BUTTON, self.onCancel, id=wx.ID_CANCEL)
51+
self.Bind(wx.EVT_BUTTON, self.onOpen, self.buttonOpen)
52+
self.Bind(wx.EVT_BUTTON, self.onNew, self.buttonNew)
53+
self.Bind(wx.EVT_BUTTON, self.onCancel, self.buttonCancel)
5454
# end wxGlade
5555
self.__customProperties()
5656

5757
def __set_properties(self):
5858
# begin wxGlade: AddPhasePanel.__set_properties
59-
self.labelOpenPhase.SetFont(wx.Font(12, wx.DEFAULT, wx.NORMAL, wx.NORMAL, 0, ""))
60-
self.labelCreatePhase.SetFont(wx.Font(12, wx.DEFAULT, wx.NORMAL, wx.NORMAL, 0, ""))
59+
self.labelOpenPhase.SetFont(wx.Font(12, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, 0, "Sans"))
60+
self.labelCreatePhase.SetFont(wx.Font(12, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, 0, "Sans"))
6161
# end wxGlade
6262

6363
def __do_layout(self):
6464
# begin wxGlade: AddPhasePanel.__do_layout
6565
sizer_1 = wx.BoxSizer(wx.VERTICAL)
6666
sizer_5 = wx.BoxSizer(wx.HORIZONTAL)
6767
sizer_4 = wx.BoxSizer(wx.HORIZONTAL)
68-
sizer_4.Add(self.labelOpenPhase, 1, wx.ALL|wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, 5)
69-
sizer_4.Add(self.buttonOpen, 0, wx.ALL|wx.ALIGN_RIGHT|wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, 5)
70-
sizer_1.Add(sizer_4, 0, wx.TOP|wx.BOTTOM|wx.EXPAND, 5)
68+
sizer_4.Add(self.labelOpenPhase, 1, wx.ALIGN_CENTER_VERTICAL | wx.ALL, 5)
69+
sizer_4.Add(self.buttonOpen, 0, wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_RIGHT | wx.ALL, 5)
70+
sizer_1.Add(sizer_4, 0, wx.BOTTOM | wx.EXPAND | wx.TOP, 5)
7171
sizer_1.Add(self.static_line_5, 0, wx.EXPAND, 0)
72-
sizer_5.Add(self.labelCreatePhase, 1, wx.ALL|wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, 5)
73-
sizer_5.Add(self.buttonNew, 0, wx.ALL|wx.ALIGN_RIGHT|wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, 5)
74-
sizer_1.Add(sizer_5, 0, wx.TOP|wx.BOTTOM|wx.EXPAND, 5)
75-
sizer_1.Add(self.static_line_6, 0, wx.BOTTOM|wx.EXPAND, 10)
76-
sizer_1.Add(self.buttonCancel, 0, wx.ALL|wx.ALIGN_RIGHT|wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, 5)
77-
sizer_1.Add((450, 10), 0, wx.ADJUST_MINSIZE, 0)
78-
self.SetAutoLayout(True)
72+
sizer_5.Add(self.labelCreatePhase, 1, wx.ALIGN_CENTER_VERTICAL | wx.ALL, 5)
73+
sizer_5.Add(self.buttonNew, 0, wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_RIGHT | wx.ALL, 5)
74+
sizer_1.Add(sizer_5, 0, wx.BOTTOM | wx.EXPAND | wx.TOP, 5)
75+
sizer_1.Add(self.static_line_6, 0, wx.BOTTOM | wx.EXPAND, 10)
76+
sizer_1.Add(self.buttonCancel, 0, wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_RIGHT | wx.ALL, 5)
77+
sizer_1.Add((450, 10), 0, 0, 0)
7978
self.SetSizer(sizer_1)
8079
sizer_1.Fit(self)
81-
sizer_1.SetSizeHints(self)
80+
self.Layout()
8281
# end wxGlade
8382

8483
# UTILITY FUNCTIONS ####
@@ -144,7 +143,7 @@ def onOpen(self, event): # wxGlade: AddPhasePanel.<event_handler>
144143
"Coordinate files (*.xyz)", "*.xyz;*.XYZ",
145144
"All Files", "*",
146145
))
147-
d = wx.FileDialog(None, "Choose a file", dir, "", matchstring, wx.OPEN)
146+
d = wx.FileDialog(None, "Choose a file", dir, "", matchstring)
148147
if d.ShowModal() == wx.ID_OK:
149148
self.fullpath = d.GetPath()
150149
self.mainFrame.workpath = os.path.dirname(self.fullpath)

src/diffpy/pdfgui/gui/bondlengthdialog.py

Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#
1515
##############################################################################
1616

17-
# generated by wxGlade 0.6 on Mon Oct 15 14:14:18 2007
17+
# generated by wxGlade 0.9.3 on Fri Jul 19 16:00:05 2019
1818

1919
import wx
2020
from diffpy.pdfgui.gui.wxExtensions.validators import TextValidator, FLOAT_ONLY
@@ -25,23 +25,22 @@
2525
class BondLengthDialog(wx.Dialog):
2626
def __init__(self, *args, **kwds):
2727
# begin wxGlade: BondLengthDialog.__init__
28-
kwds["style"] = wx.DEFAULT_DIALOG_STYLE
28+
kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_DIALOG_STYLE
2929
wx.Dialog.__init__(self, *args, **kwds)
30-
self.sizer_2_staticbox = wx.StaticBox(self, -1, "")
31-
self.instructionsLabel = wx.StaticText(self, -1, "Enter the indices of two atoms.")
32-
self.indicesLabel = wx.StaticText(self, -1, "Atom Indices")
33-
self.aSpinCtrl = wx.SpinCtrl(self, -1, "", min=0, max=100)
34-
self.bSpinCtrl = wx.SpinCtrl(self, -1, "", min=0, max=100)
35-
self.static_line_2 = wx.StaticLine(self, -1)
36-
self.instructionsLabel2 = wx.StaticText(self, -1, "Or enter the elemental symbols of two atoms and\nthe range over which to calculate the bond lengths.")
37-
self.elementLabel = wx.StaticText(self, -1, "Elements")
38-
self.aComboBox = wx.ComboBox(self, -1, choices=[], style=wx.CB_DROPDOWN)
39-
self.bComboBox = wx.ComboBox(self, -1, choices=[], style=wx.CB_DROPDOWN)
40-
self.rangeLabel = wx.StaticText(self, -1, "Range")
41-
self.lbTextCtrl = wx.TextCtrl(self, -1, "")
42-
self.toLabel = wx.StaticText(self, -1, "to")
43-
self.ubTextCtrl = wx.TextCtrl(self, -1, "")
44-
self.static_line_1 = wx.StaticLine(self, -1)
30+
self.instructionsLabel = wx.StaticText(self, wx.ID_ANY, "Enter the indices of two atoms.")
31+
self.indicesLabel = wx.StaticText(self, wx.ID_ANY, "Atom Indices")
32+
self.aSpinCtrl = wx.SpinCtrl(self, wx.ID_ANY, "", min=0, max=100, style=0)
33+
self.bSpinCtrl = wx.SpinCtrl(self, wx.ID_ANY, "", min=0, max=100, style=0)
34+
self.static_line_2 = wx.StaticLine(self, wx.ID_ANY)
35+
self.instructionsLabel2 = wx.StaticText(self, wx.ID_ANY, "Or enter the elemental symbols of two atoms and\nthe range over which to calculate the bond lengths.")
36+
self.elementLabel = wx.StaticText(self, wx.ID_ANY, "Elements")
37+
self.aComboBox = wx.ComboBox(self, wx.ID_ANY, choices=[], style=0)
38+
self.bComboBox = wx.ComboBox(self, wx.ID_ANY, choices=[], style=0)
39+
self.rangeLabel = wx.StaticText(self, wx.ID_ANY, "Range")
40+
self.lbTextCtrl = wx.TextCtrl(self, wx.ID_ANY, "")
41+
self.toLabel = wx.StaticText(self, wx.ID_ANY, "to")
42+
self.ubTextCtrl = wx.TextCtrl(self, wx.ID_ANY, "")
43+
self.static_line_1 = wx.StaticLine(self, wx.ID_ANY)
4544
self.cancelButton = wx.Button(self, wx.ID_CANCEL, "Cancel")
4645
self.okButton = wx.Button(self, wx.ID_OK, "OK")
4746

@@ -50,8 +49,8 @@ def __init__(self, *args, **kwds):
5049

5150
self.Bind(wx.EVT_SPINCTRL, self.onSpin, self.aSpinCtrl)
5251
self.Bind(wx.EVT_SPINCTRL, self.onSpin, self.bSpinCtrl)
53-
self.Bind(wx.EVT_BUTTON, self.onCancel, id=wx.ID_CANCEL)
54-
self.Bind(wx.EVT_BUTTON, self.onOk, id=wx.ID_OK)
52+
self.Bind(wx.EVT_BUTTON, self.onCancel, self.cancelButton)
53+
self.Bind(wx.EVT_BUTTON, self.onOk, self.okButton)
5554
# end wxGlade
5655
self.__customProperties()
5756

@@ -68,25 +67,25 @@ def __set_properties(self):
6867

6968
def __do_layout(self):
7069
# begin wxGlade: BondLengthDialog.__do_layout
71-
sizer_2 = wx.StaticBoxSizer(self.sizer_2_staticbox, wx.VERTICAL)
70+
sizer_2 = wx.StaticBoxSizer(wx.StaticBox(self, wx.ID_ANY, ""), wx.VERTICAL)
7271
sizer_4_copy = wx.BoxSizer(wx.HORIZONTAL)
7372
sizer_4_copy_1 = wx.BoxSizer(wx.HORIZONTAL)
7473
sizer_4 = wx.BoxSizer(wx.HORIZONTAL)
7574
sizer_3 = wx.BoxSizer(wx.HORIZONTAL)
76-
sizer_2.Add(self.instructionsLabel, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5)
77-
sizer_3.Add(self.indicesLabel, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5)
75+
sizer_2.Add(self.instructionsLabel, 0, wx.ALIGN_CENTER_VERTICAL | wx.ALL, 5)
76+
sizer_3.Add(self.indicesLabel, 0, wx.ALIGN_CENTER_VERTICAL | wx.ALL, 5)
7877
sizer_3.Add(self.aSpinCtrl, 0, wx.ALL, 5)
7978
sizer_3.Add(self.bSpinCtrl, 0, wx.ALL, 5)
8079
sizer_2.Add(sizer_3, 0, wx.EXPAND, 0)
81-
sizer_2.Add(self.static_line_2, 0, wx.BOTTOM|wx.EXPAND, 5)
82-
sizer_2.Add(self.instructionsLabel2, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5)
83-
sizer_4.Add(self.elementLabel, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5)
80+
sizer_2.Add(self.static_line_2, 0, wx.BOTTOM | wx.EXPAND, 5)
81+
sizer_2.Add(self.instructionsLabel2, 0, wx.ALIGN_CENTER_VERTICAL | wx.ALL, 5)
82+
sizer_4.Add(self.elementLabel, 0, wx.ALIGN_CENTER_VERTICAL | wx.ALL, 5)
8483
sizer_4.Add(self.aComboBox, 0, wx.ALL, 5)
8584
sizer_4.Add(self.bComboBox, 0, wx.ALL, 5)
8685
sizer_2.Add(sizer_4, 0, wx.EXPAND, 0)
87-
sizer_4_copy_1.Add(self.rangeLabel, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5)
86+
sizer_4_copy_1.Add(self.rangeLabel, 0, wx.ALIGN_CENTER_VERTICAL | wx.ALL, 5)
8887
sizer_4_copy_1.Add(self.lbTextCtrl, 0, wx.ALL, 5)
89-
sizer_4_copy_1.Add(self.toLabel, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5)
88+
sizer_4_copy_1.Add(self.toLabel, 0, wx.ALIGN_CENTER_VERTICAL | wx.ALL, 5)
9089
sizer_4_copy_1.Add(self.ubTextCtrl, 0, wx.ALL, 5)
9190
sizer_2.Add(sizer_4_copy_1, 0, wx.EXPAND, 0)
9291
sizer_2.Add(self.static_line_1, 0, wx.EXPAND, 0)

src/diffpy/pdfgui/gui/calculationpanel.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#
1515
##############################################################################
1616

17-
# generated by wxGlade 0.4.1 on Mon Apr 3 19:12:03 2006
17+
# generated by wxGlade 0.9.3 on Fri Jul 19 16:00:20 2019
1818

1919
import wx
2020
from diffpy.pdfgui.gui.wxExtensions.validators import TextValidator, FLOAT_ONLY
@@ -61,7 +61,7 @@ def __init__(self, *args, **kwds):
6161

6262
def __set_properties(self):
6363
# begin wxGlade: CalculationPanel.__set_properties
64-
self.panelNameLabel.SetFont(wx.Font(18, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))
64+
self.panelNameLabel.SetFont(wx.Font(18, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_BOLD, 0, ""))
6565
self.radioBoxStype.SetMinSize((330, 43))
6666
self.radioBoxStype.SetSelection(0)
6767
# end wxGlade

0 commit comments

Comments
 (0)