BUGFIX: Fixing font selection commands for wxPython.
The previous way of selecting fonts was an obsolete hack. Some recent versions of wxPython ran into problems. Now updated to reflect the correct wxPython font selection conventions. Bug report and fix suggestion by S. Dismore.
This commit is contained in:
parent
f9a34f4de5
commit
b6517dd41e
@ -298,7 +298,7 @@ class ResultWindow(wx.Frame):
|
|||||||
|
|
||||||
def titlebar(x,title,width=1):
|
def titlebar(x,title,width=1):
|
||||||
txt = wx.StaticText(self,-1,title)
|
txt = wx.StaticText(self,-1,title)
|
||||||
font = wx.Font(14,wx.NORMAL,wx.NORMAL,wx.BOLD)
|
font = wx.Font(14,wx.FONTFAMILY_DEFAULT,wx.FONTSTYLE_NORMAL,wx.FONTWEIGHT_BOLD)
|
||||||
txt.SetFont(font)
|
txt.SetFont(font)
|
||||||
grid.Add(txt,(0,x),(1,width),wx.ALL,10)
|
grid.Add(txt,(0,x),(1,width),wx.ALL,10)
|
||||||
|
|
||||||
@ -376,7 +376,7 @@ class ResultWindow(wx.Frame):
|
|||||||
rankc = cl.getColour()
|
rankc = cl.getColour()
|
||||||
rankt = cl.getOkay()
|
rankt = cl.getOkay()
|
||||||
txt = wx.StaticText(self,-1,rankt)
|
txt = wx.StaticText(self,-1,rankt)
|
||||||
font = wx.Font(11,wx.NORMAL,wx.NORMAL,wx.BOLD)
|
font = wx.Font(11,wx.FONTFAMILY_DEFAULT,wx.FONTSTYLE_NORMAL,wx.FONTWEIGHT_BOLD)
|
||||||
txt.SetFont(font)
|
txt.SetFont(font)
|
||||||
txt.SetForegroundColour(rankc)
|
txt.SetForegroundColour(rankc)
|
||||||
grid.Add(txt,(ypos,xpos),(1,1),wx.ALL,10)
|
grid.Add(txt,(ypos,xpos),(1,1),wx.ALL,10)
|
||||||
|
@ -57,7 +57,7 @@ class MyGrid(wx.GridBagSizer):
|
|||||||
self.lineAdd()
|
self.lineAdd()
|
||||||
self.ypos += 1
|
self.ypos += 1
|
||||||
txt = wx.StaticText(self.parent,-1,title)
|
txt = wx.StaticText(self.parent,-1,title)
|
||||||
font = wx.Font(12,wx.DEFAULT,wx.NORMAL,wx.BOLD)
|
font = wx.Font(12,wx.FONTFAMILY_DEFAULT,wx.FONTSTYLE_NORMAL,wx.FONTWEIGHT_BOLD)
|
||||||
txt.SetFont(font)
|
txt.SetFont(font)
|
||||||
self.Add(txt,pos=(self.ypos,0),span=(1,2),flag=wx.ALIGN_LEFT)
|
self.Add(txt,pos=(self.ypos,0),span=(1,2),flag=wx.ALIGN_LEFT)
|
||||||
self.ypos += 1
|
self.ypos += 1
|
||||||
|
Loading…
Reference in New Issue
Block a user