Text align fix + removal of early polish applied to statspane gauges
This commit is contained in:
@@ -264,14 +264,14 @@ class PyGauge(wx.PyWindow):
|
||||
dc.DrawRectangleRect(r)
|
||||
|
||||
dc.SetTextForeground(wx.Colour(255,255,255))
|
||||
font1 = wx.Font(7, wx.SWISS, wx.NORMAL, wx.NORMAL)
|
||||
font1 = wx.Font(9, wx.MODERN, wx.NORMAL, wx.NORMAL)
|
||||
dc.SetFont(font1)
|
||||
if self._skipDigits == True:
|
||||
textWidth=len(str(int(self._value[0]*100/self._range)) + "%") * 7
|
||||
dc.DrawText(str(int(self._value[0]*100/self._range)) + "%",rect.width/2-textWidth/2,(rect.height-8)/2)
|
||||
textWidth=len(str(int(self._value[0]*100/self._range)) + "%") * 9
|
||||
dc.DrawText(str(int(self._value[0]*100/self._range)) + "%",(rect.width-2)/2 - textWidth/4,(rect.height-11)/2)
|
||||
else:
|
||||
textWidth=len(str(round(float(self._value[0]*100/self._range),1))+ "%") * 7
|
||||
dc.DrawText(str(round(float(self._value[0]*100/self._range),1)) + "%",rect.width/2-textWidth/2,(rect.height-8)/2)
|
||||
textWidth=len(str(round(float(self._value[0]*100/self._range),1))+ "%")*9
|
||||
dc.DrawText(str(round(float(self._value[0]*100/self._range),1)) + "%",(rect.width-2)/2-textWidth/4,(rect.height-11)/2)
|
||||
|
||||
def OnTimer(self,event):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user