so many pep8 fixes
(cherry picked from commit bee125d)
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
import wx
|
||||
import gui.utils.colorUtils as colorUtils
|
||||
|
||||
|
||||
class LoadAnimation(wx.Window):
|
||||
def __init__ (self, parent, id = wx.ID_ANY, label = "", pos = wx.DefaultPosition, size = wx.DefaultSize, style = 0):
|
||||
wx.Window.__init__(self, parent, id, pos = pos, size = size, style = style)
|
||||
def __init__(self, parent, id=wx.ID_ANY, label="", pos=wx.DefaultPosition, size=wx.DefaultSize, style=0):
|
||||
wx.Window.__init__(self, parent, id, pos=pos, size=size, style=style)
|
||||
|
||||
self.label = label
|
||||
|
||||
@@ -16,7 +17,6 @@ class LoadAnimation(wx.Window):
|
||||
self.bars = 10
|
||||
self.padding = 2
|
||||
|
||||
|
||||
self.Bind(wx.EVT_ERASE_BACKGROUND, self.OnEraseBackground)
|
||||
self.Bind(wx.EVT_TIMER, self.OnTimer)
|
||||
self.Bind(wx.EVT_PAINT, self.OnPaint)
|
||||
@@ -64,14 +64,14 @@ class LoadAnimation(wx.Window):
|
||||
|
||||
x = self.padding
|
||||
|
||||
for bar in xrange(self.bars):
|
||||
for bar in range(self.bars):
|
||||
if bar != self.animCount:
|
||||
dc.SetPen(wx.Pen(shadeColor))
|
||||
dc.SetBrush(wx.Brush(shadeColor))
|
||||
bh = barHeight
|
||||
y = self.padding
|
||||
else:
|
||||
barColor = colorUtils.GetSuitableColor(barColor,float(self.animCount/2)/10)
|
||||
barColor = colorUtils.GetSuitableColor(barColor, float(self.animCount / 2) / 10)
|
||||
dc.SetPen(wx.Pen(barColor))
|
||||
dc.SetBrush(wx.Brush(barColor))
|
||||
bh = rect.height
|
||||
@@ -82,17 +82,17 @@ class LoadAnimation(wx.Window):
|
||||
|
||||
textColor = wx.SystemSettings_GetColour(wx.SYS_COLOUR_WINDOWTEXT)
|
||||
dc.SetTextForeground(textColor)
|
||||
dc.DrawLabel(self.label,rect,wx.ALIGN_CENTER)
|
||||
dc.DrawLabel(self.label, rect, wx.ALIGN_CENTER)
|
||||
|
||||
|
||||
class WaitDialog(wx.Dialog):
|
||||
def __init__(self, parent, title = "Processing"):
|
||||
wx.Dialog.__init__ (self, parent, id=wx.ID_ANY, title = title, size=(300,30),
|
||||
def __init__(self, parent, title="Processing"):
|
||||
wx.Dialog.__init__(self, parent, id=wx.ID_ANY, title=title, size=(300, 30),
|
||||
style=wx.NO_BORDER)
|
||||
mainSizer = wx.BoxSizer( wx.HORIZONTAL )
|
||||
mainSizer = wx.BoxSizer(wx.HORIZONTAL)
|
||||
|
||||
self.progress = LoadAnimation(self,label = title, size=(300,30))
|
||||
mainSizer.Add( self.progress, 1, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 0 )
|
||||
self.SetSizer( mainSizer )
|
||||
self.progress = LoadAnimation(self, label=title, size=(300, 30))
|
||||
mainSizer.Add(self.progress, 1, wx.ALL | wx.ALIGN_CENTER_VERTICAL, 0)
|
||||
self.SetSizer(mainSizer)
|
||||
self.Layout()
|
||||
self.CenterOnParent()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user