Skip to content

Commit 16559e2

Browse files
committed
add some to-do comments about scaling the MPL window contents
1 parent 098f30f commit 16559e2

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

GSASII/GSASIIplot.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@ def __init__(self,parent,id=-1,dpi=None,publish=None,**kwargs):
215215
_tabPlotWin.__init__(self,parent,id=id,**kwargs)
216216
mpl.rcParams['legend.fontsize'] = 12
217217
mpl.rcParams['axes.grid'] = False
218+
#TODO: set dpi here via config var: this changes the size of the labeling font 72-100 is normal
218219
self.figure = mplfig.Figure(dpi=dpi,figsize=(5,6))
219220
self.canvas = Canvas(self,-1,self.figure)
220221
self.toolbar = GSASIItoolbar(self.canvas,publish=publish)
@@ -634,6 +635,11 @@ def set_message(self,s):
634635
'''
635636
pass
636637

638+
# TODO: perhaps someday we could pull out the bitmaps and rescale there here
639+
# def AddTool(self,*args,**kwargs):
640+
# print('AddTool',args,kwargs)
641+
# return Toolbar.AddTool(self,*args,**kwargs)
642+
637643
def AddToolBarTool(self,label,title,filename,callback):
638644
bmpFilename = GSASIIpath.getIconFile(filename)
639645
if bmpFilename is None:
@@ -642,10 +648,7 @@ def AddToolBarTool(self,label,title,filename,callback):
642648
else:
643649
bmp = wx.Bitmap(bmpFilename)
644650
# bmp = wx.Bitmap(bmpFilename,type=wx.BITMAP_TYPE_ANY) # probably better
645-
if 'phoenix' in wx.version():
646-
button = self.AddTool(wx.ID_ANY, label, bmp, title)
647-
else:
648-
button = self.AddSimpleTool(wx.ID_ANY, bmp, label, title)
651+
button = self.AddTool(wx.ID_ANY, label, bmp, title)
649652
wx.EVT_TOOL.Bind(self, button.GetId(), button.GetId(), callback)
650653
return button.GetId()
651654

0 commit comments

Comments
 (0)