diff --git a/Container.py b/Container.py index 635dad52..a8a4b72a 100644 --- a/Container.py +++ b/Container.py @@ -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): @@ -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() @@ -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): @@ -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)) @@ -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)) @@ -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 diff --git a/PlotGUI.py b/PlotGUI.py index 3e7f63aa..837d71a9 100644 --- a/PlotGUI.py +++ b/PlotGUI.py @@ -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) @@ -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)) diff --git a/PropPanel.py b/PropPanel.py index 8e7d8db3..2dac1b81 100644 --- a/PropPanel.py +++ b/PropPanel.py @@ -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 diff --git a/PropertiesGridCtrl.py b/PropertiesGridCtrl.py index 24f6cd5f..3e7006a0 100644 --- a/PropertiesGridCtrl.py +++ b/PropertiesGridCtrl.py @@ -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) @@ -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): diff --git a/Reporter.py b/Reporter.py index 3a9e4d20..ba0505c8 100644 --- a/Reporter.py +++ b/Reporter.py @@ -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) diff --git a/RubberBande.py b/RubberBande.py index 086cace0..2b798c43 100644 --- a/RubberBande.py +++ b/RubberBande.py @@ -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) @@ -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) diff --git a/WizardGUI.py b/WizardGUI.py index 91ef8956..bc77f7f2 100644 --- a/WizardGUI.py +++ b/WizardGUI.py @@ -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) diff --git a/devsimpy.py b/devsimpy.py index 3daaea99..59c6ebf3 100644 --- a/devsimpy.py +++ b/devsimpy.py @@ -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) diff --git a/wxPyMail.py b/wxPyMail.py index fe150299..d03705d6 100644 --- a/wxPyMail.py +++ b/wxPyMail.py @@ -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))