Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Container.py
Original file line number Diff line number Diff line change
Expand Up @@ -1223,7 +1223,7 @@ def __init__(self, x=[], y=[]):
self.x = array.array('d',x) # list of x coord
self.y = array.array('d',y) # list of y coords
self.fill= Shape.FILL # fill color
self.pen = [self.fill[0] , 1, wx.SOLID] # pen color and size
self.pen = [self.fill[0] , 1, wx.PENSTYLE_SOLID] # pen color and size
self.font = [FONT_SIZE, 74, 93, 700, u'Arial']

def draw(self, dc):
Expand Down Expand Up @@ -1779,7 +1779,7 @@ def OnPaint(self, event):
# Initialize the wx.BufferedPaintDC, assigning a background
# colour and a foreground colour (to draw the text)
backColour = self.GetBackgroundColour()
backBrush = wx.Brush(backColour, wx.SOLID)
backBrush = wx.Brush(backColour, wx.PENSTYLE_SOLID)
pdc.SetBackground(backBrush)
pdc.Clear()

Expand Down Expand Up @@ -2394,7 +2394,7 @@ def OnLeftUp(self, event):
for item in [s for s in self.select() if isinstance(s, ConnectionShape)]:
### restore solid connection
if len(item.pen)>2:
item.pen[2]= wx.SOLID
item.pen[2]= wx.PENSTYLE_SOLID

if None in (item.output, item.input):

Expand Down Expand Up @@ -2598,7 +2598,7 @@ def OnMotion(self, event):
elif isinstance(s, ConnectionShape):
### dot trace to prepare connection
if len(s.pen)>2:
s.pen[2]= wx.DOT
s.pen[2]= wx.PENSTYLE_DOT

self.SetCursor(wx.StockCursor(wx.CURSOR_HAND))

Expand Down Expand Up @@ -4192,7 +4192,7 @@ def draw(self, dc):

self.fill = [GREEN]

dc.SetFont(wx.Font(10, wx.MODERN, wx.NORMAL, wx.NORMAL))
dc.SetFont(wx.Font(10, wx.FONTFAMILY_MODERN, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL))

### prot number
#dc.SetPen(wx.Pen(wx.NamedColour('black'), 20))
Expand Down Expand Up @@ -4263,7 +4263,7 @@ def draw(self, dc):
self.moveto(x, y)
self.fill = [RED]

dc.SetFont(wx.Font(10, wx.MODERN, wx.NORMAL, wx.NORMAL))
dc.SetFont(wx.Font(10, wx.FONTFAMILY_MODERN, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL))
#dc.SetPen(wx.Pen(wx.NamedColour('black'), 20))

### prot number
Expand Down
4 changes: 2 additions & 2 deletions PlotGUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ def drawPointLabel(self, dc, nearest):
ptx, pty = nearest["scaledXY"]

dc.SetPen(wx.Pen(wx.BLACK))
dc.SetBrush(wx.Brush(wx.WHITE, wx.TRANSPARENT))
dc.SetBrush(wx.Brush(wx.WHITE, wx.PENSTYLE_TRANSPARENT))
dc.SetLogicalFunction(wx.INVERT)
dc.CrossHair(ptx, pty)
dc.DrawRectangle(ptx-3, pty-3, 7, 7)
Expand Down Expand Up @@ -455,7 +455,7 @@ def OnReset(self,event):

def resetDefaults(self):
"""Just to reset the fonts back to the PlotCanvas defaults"""
self.client.SetFont(wx.Font(10,wx.SWISS,wx.NORMAL,wx.NORMAL))
self.client.SetFont(wx.Font(10, wx.FONTFAMILY_SWISS, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL))
self.client.SetFontSizeAxis(10)
self.client.SetFontSizeLegend(7)
self.client.setLogScale((False,False))
Expand Down
2 changes: 1 addition & 1 deletion PropPanel.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def defaultPropertiesPage(self):

propContent = wx.StaticText(self, wx.NewIdRef(), _("Select a model from diagram \n to see their properties."))
sum_font = propContent.GetFont()
sum_font.SetWeight(wx.BOLD)
sum_font.SetWeight(wx.FONTWEIGHT_BOLD)
propContent.SetFont(sum_font)

return propContent
Expand Down
6 changes: 3 additions & 3 deletions PropertiesGridCtrl.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ def Draw(self, grid, attr, dc, rect, row, col, isSelected):
fg = attr.GetTextColour()
dc.SetTextBackground(bg)
dc.SetTextForeground(fg)
dc.SetBrush(wx.Brush(bg, wx.SOLID))
dc.SetBrush(wx.Brush(bg, wx.PENSTYLE_SOLID))
dc.SetPen(wx.TRANSPARENT_PEN)
dc.DrawRectangleRect(rect) if wx.VERSION_STRING < '4.0' else wx.DC.DrawRectangle(dc, rect)
grid.DrawTextRectangle(dc, text, rect, hAlign, vAlign)
Expand Down Expand Up @@ -493,11 +493,11 @@ def GetAttr(self, row, col, kind):
### format font of attr
if col == 0:
attr.SetReadOnly(True)
attr.SetFont(wx.Font(10, wx.SWISS, wx.NORMAL, wx.BOLD))
attr.SetFont(wx.Font(10, wx.FONTFAMILY_SWISS, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_BOLD))
#attr.SetBackgroundColour("light blue")
elif col == 2:
attr.SetReadOnly(True)
attr.SetFont(wx.Font(10, wx.SWISS, wx.ITALIC, wx.NORMAL))
attr.SetFont(wx.Font(10, wx.FONTFAMILY_SWISS, wx.FONTFAMILY_ITALIC, wx.FONTWEIGHT_NORMAL))
else:
### load color in cell for pen and fill
if isinstance(val, list):
Expand Down
2 changes: 1 addition & 1 deletion Reporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ def DoLayout(self):
"Traceback shown below."))
t_lbl = wx.StaticText(self, label=_("Error Traceback:"))

t_lbl.SetFont(wx.Font(8, wx.SWISS, wx.NORMAL, wx.BOLD, False))
t_lbl.SetFont(wx.Font(8, wx.FONTFAMILY_SWISS, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_BOLD, False))
# Layout
mainSizer = wx.BoxSizer(wx.VERTICAL)
topSizer = wx.BoxSizer(wx.HORIZONTAL)
Expand Down
8 changes: 4 additions & 4 deletions RubberBande.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ def OnMouseEvent(self, event):
# dont do any filling of the dc. It is set just for
# the sake of completion.

wbrush = wx.Brush(wx.Colour(255,255,255), wx.TRANSPARENT)
wpen = wx.Pen(wx.Colour(200, 200, 200), 1, wx.SOLID)
wbrush = wx.Brush(wx.Colour(255,255,255), wx.PENSTYLE_TRANSPARENT)
wpen = wx.Pen(wx.Colour(200, 200, 200), 1, wx.PENSTYLE_SOLID)
dc.SetBrush(wbrush)
dc.SetPen(wpen)

Expand Down Expand Up @@ -154,8 +154,8 @@ def ClearCurrentSelection(self):
# dont do any filling of the dc. It is set for
# sake of completion.

wbrush = wx.Brush(wx.Colour(255,255,255), wx.TRANSPARENT)
wpen = wx.Pen(wx.Colour(200, 200, 200), 1, wx.SOLID)
wbrush = wx.Brush(wx.Colour(255,255,255), wx.PENSTYLE_TRANSPARENT)
wpen = wx.Pen(wx.Colour(200, 200, 200), 1, wx.PENSTYLE_SOLID)
dc.SetBrush(wbrush)
dc.SetPen(wpen)
dc.DrawRectangle(box[0], box[1], w,h)
Expand Down
2 changes: 1 addition & 1 deletion WizardGUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ def __init__(self, parent, title):
self.next = self.prev = None
self.sizer = wx.BoxSizer(wx.VERTICAL)
self.title = wx.StaticText(self, wx.NewIdRef(), title)
self.title.SetFont(wx.Font(18, wx.SWISS, wx.NORMAL, wx.BOLD))
self.title.SetFont(wx.Font(18, wx.FONTFAMILY_SWISS, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_BOLD))
if wx.VERSION_STRING<'4.0':
self.sizer.AddWindow(self.title, 0, wx.ALIGN_LEFT|wx.ALL, padding)
self.sizer.AddWindow(wx.StaticLine(self, wx.NewIdRef()), 0, wx.EXPAND|wx.ALL, padding)
Expand Down
2 changes: 1 addition & 1 deletion devsimpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -2255,7 +2255,7 @@ def __init__(self, app):
self.SetSize((w, h))

self.SetTextPosition((30, h-20))
self.SetTextFont(wx.Font(9, wx.SWISS, wx.ITALIC, wx.NORMAL, False))
self.SetTextFont(wx.Font(9, wx.FONTFAMILY_SWISS, wx.FONTSTYLE_ITALIC, wx.FONTWEIGHT_NORMAL, False))
self.SetTextColour("#797373")

self.Bind(wx.EVT_CLOSE,self.OnClose)
Expand Down
2 changes: 1 addition & 1 deletion wxPyMail.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def createToolbar(self):
def createWidgets(self):
p = self.panel

font = wx.Font(10, wx.SWISS, wx.NORMAL, wx.BOLD)
font = wx.Font(10, wx.FONTFAMILY_SWISS, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_BOLD)
self.fromLbl = wx.StaticText(p, wx.NewIdRef(), _('From:'), size=(70,-1))
self.fromTxt = wx.TextCtrl(p, wx.NewIdRef(), self.email)
self.toLbl = wx.StaticText(p, wx.NewIdRef(), _('To:'), size=(70,-1))
Expand Down